Enumerations — Aspose.3D Python API Reference
Package: aspose.threed.entities (aspose-3d-foss 26.1.0)
This page documents all standalone enumerations defined in the aspose.threed.entities sub-package. Enumerations for vertex element semantics (VertexElementType, MappingMode, ReferenceMode) are also documented on the VertexElement reference page.
ProjectionType
Controls the projection model used by a Camera.
from aspose.threed.entities import ProjectionType| Value | Description |
|---|---|
PERSPECTIVE | Objects appear smaller as they recede from the camera. This is the standard mode for game and visualisation rendering. |
ORTHOGRAPHIC | Objects are rendered at a constant scale regardless of distance. Used for CAD, architecture, and isometric projections. |
Example
from aspose.threed import Scene
from aspose.threed.entities import Camera, ProjectionType
scene = Scene()
cam = Camera()
cam.projection_type = ProjectionType.ORTHOGRAPHIC
scene.root_node.create_child_node("cam", cam)LightType
Identifies the category of a Light source.
from aspose.threed.entities import LightType| Value | Description |
|---|---|
POINT | Emits light equally in all directions from a single point in space. |
DIRECTIONAL | Emits parallel light rays as if from an infinitely distant source (e.g., sunlight). |
SPOT | Emits a cone of light in a specified direction with inner and outer cone angles. |
AREA | A two-dimensional emissive surface; used in physically-based rendering. |
VOLUME | Volumetric light source that illuminates a region of space. |
Example
from aspose.threed import Scene
from aspose.threed.entities import Light, LightType
scene = Scene()
sun = Light()
sun.light_type = LightType.DIRECTIONAL
scene.root_node.create_child_node("sun", sun)TextureMapping
Identifies the semantic channel a UV element or texture is bound to on a surface.
from aspose.threed.entities import TextureMapping| Value | Description |
|---|---|
DIFFUSE | Albedo / base colour texture channel. The most commonly used channel. |
SPECULAR | Specular colour or intensity texture channel. |
AMBIENT | Ambient light colour override texture. |
EMISSIVE | Self-illumination / emission texture channel. |
NORMAL | Tangent-space normal map channel. |
BUMP | Height-based bump map channel (used before normal maps were standard). |
OPACITY | Alpha / transparency mask channel. |
GLOW | Glow / bloom intensity texture channel. |
REFLECTION | Environment reflection texture channel. |
SHADOW | Shadow projection texture channel. |
SHININESS | Specular exponent / roughness map channel. |
DISPLACEMENT | Geometry displacement map channel. |
Example
from aspose.threed import Scene
from aspose.threed.entities import Mesh, TextureMapping, MappingMode, ReferenceMode
from aspose.threed.utilities import Vector4
mesh = Mesh()
for v in [(0,0,0), (1,0,0), (1,1,0)]:
mesh.control_points.append(Vector4(*v, 1.0))
mesh.create_polygon(0, 1, 2)
# Attach a UV layer for the diffuse channel
uv = mesh.create_element_uv(TextureMapping.DIFFUSE, MappingMode.CONTROL_POINT, ReferenceMode.DIRECT)BooleanOperation
Identifies the type of constructive solid geometry (CSG) Boolean operation between two mesh objects.
from aspose.threed.entities import BooleanOperation| Value | Description |
|---|---|
ADD | Union: the result is the combined volume of both operands. |
SUB | Subtraction: the volume of the second operand is removed from the first. |
INTERSECT | Intersection: the result is the volume shared by both operands. |
BooleanOperation is stored as metadata on nodes or custom objects produced by CSG importers. Aspose.3D for Python does not provide a runtime Boolean evaluator; the enum describes source-file intent.
Example
from aspose.threed import CustomObject
from aspose.threed.entities import BooleanOperation
csg_meta = CustomObject("csg_op")
csg_meta.set_property("operation", str(BooleanOperation.SUB))VertexElementType
Semantic type for a VertexElement layer. See also: VertexElement reference.
from aspose.threed.entities import VertexElementType| Value | Description |
|---|---|
NORMAL | Surface normal vectors. |
UV | Texture UV coordinates. |
VERTEX_COLOR | Per-vertex RGBA colour. |
TANGENT | Tangent vectors for normal mapping. |
BINORMAL | Binormal (bitangent) vectors. |
SMOOTHING_GROUP | Per-polygon smoothing group integer IDs. |
MATERIAL | Per-polygon material index. |
POLYGON_GROUP | Polygon grouping index. |
VERTEX_CREASE | Subdivision vertex crease weights. |
EDGE_CREASE | Subdivision edge crease weights. |
USER_DATA | Arbitrary user-defined data. |
VISIBILITY | Per-element visibility flags. |
SPECULAR | Specular colour or intensity. |
WEIGHT | Blend weights for skinning. |
HOLE | Polygon hole flags. |
MappingMode
Controls which geometry primitive each vertex element value is associated with. See also: VertexElement reference.
from aspose.threed.entities import MappingMode| Value | Description |
|---|---|
CONTROL_POINT | One value per control point (vertex). |
POLYGON_VERTEX | One value per polygon corner (face-vertex). |
POLYGON | One value per polygon. |
EDGE | One value per edge. |
ALL_SAME | A single value applies to the entire mesh. |
ReferenceMode
Controls how the vertex element data array is indexed. See also: VertexElement reference.
from aspose.threed.entities import ReferenceMode| Value | Description |
|---|---|
DIRECT | Data is accessed sequentially without a separate indices array. |
INDEX | Data is accessed via a separate indices array. |
INDEX_TO_DIRECT | An indices array maps each mapping primitive to a position in the data array. |