---
Product: Aspose.3D
Platform: java
Page Type: reference
Canonical URL: https://reference.aspose.org/3d/java/primitive
---

# Primitive

## Overview

`Primitive` is a class in Aspose.3D FOSS for Java.
Inherits from: `Entity`, `IMeshConvertible`.

Base class for all primitives.

This class provides 28 methods for working with Primitive objects in Java programs.
Available methods include: `A3DObject`, `Entity`, `Primitive`, `SceneObject`, `findProperty`, `getBoundingBox`, `getCastShadows`, `getEntityRendererKey`, `getExcluded`, `getName`, `getParentNode`, `getParentNodes`, and 12 additional methods.
All public members are accessible to any Java application after installing the Aspose.3D FOSS for Java package.
Properties: `boundingBox`, `castShadows`, `entityRendererKey`, `excluded`, `name`, `parentNode`, and 4 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `castShadows` | `boolean` | Read/Write | Gets whether this geometry can cast shadow. |
| `receiveShadows` | `boolean` | Read/Write | Gets whether this geometry can receive shadow. |
| `parentNode` | `Node` | Read/Write | Gets or sets the parent node. |
| `parentNodes` | `ArrayList<Node>` | Read | Gets the parent nodes. |
| `excluded` | `boolean` | Read/Write | Gets or sets the excluded. |
| `boundingBox` | `BoundingBox` | Read | Gets the bounding box. |
| `entityRendererKey` | `EntityRendererKey` | Read | Gets the entity renderer key. |
| `scene` | `Scene` | Read | Gets the scene. |
| `name` | `String` | Read/Write | Gets or sets the name. |
| `properties` | `PropertyCollection` | Read | Gets the properties. |

## Methods

| Signature | Description |
|-----------|-------------|
| `getCastShadows()` → `boolean` | Gets whether this geometry can cast shadow. |
| `setCastShadows(value: boolean)` | Sets the cast shadows value. |
| `getReceiveShadows()` → `boolean` | Gets whether this geometry can receive shadow. |
| `setReceiveShadows(value: boolean)` | Sets the receive shadows value. |
| `Primitive()` | Initializes a new instance of the Primitive class. |
| `Primitive(name: String)` | Initializes a new instance of the Primitive class. |
| `toMesh()` → `Mesh` | Convert current object to mesh. |
| `Entity(name: String)` | Calls Entity(name) on this Primitive instance. |
| `getParentNode()` → `Node` | Returns the parent node. |
| `setParentNode(value: Node)` | Sets the parent node value. |
| `getParentNodes()` → `ArrayList<Node>` | Returns the parent nodes. |
| `getExcluded()` → `boolean` | Returns the excluded. |
| `setExcluded(value: boolean)` | Sets the excluded value. |
| `getBoundingBox()` → `BoundingBox` | Returns the bounding box. |
| `getEntityRendererKey()` → `EntityRendererKey` | Returns the entity renderer key. |
| `SceneObject()` | Base class for all primitives. |
| `SceneObject(name: String)` | Calls SceneObject(name) on this Primitive instance. |
| `getScene()` → `Scene` | Returns the scene. |
| `A3DObject()` | Calls A3DObject on this Primitive instance. |
| `A3DObject(name: String)` | Calls A3DObject(name) on this Primitive instance. |
| `getName()` → `String` | Returns the name. |
| `setName(name: String)` | Sets the name value. |
| `getProperties()` → `PropertyCollection` | Returns the properties. |
| `findProperty(name: String)` → `Property` | Calls findProperty(name) on this Primitive instance. |
| `getProperty(name: String)` → `Object` | Calls getProperty(name) on this Primitive instance. |
| `setProperty(name: String, value: Object)` | Sets the property value. |
| `removeProperty(name: String)` → `boolean` | Calls removeProperty(name) on this Primitive instance. |
| `removeProperty(property: Property)` → `boolean` | Calls removeProperty(property) on this Primitive instance. |

## See Also
- [Aspose.3D for Java — Enterprise API Reference](https://reference.aspose.com/3d/java/com.aspose.threed/primitive/)