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
ValueDescription
PERSPECTIVEObjects appear smaller as they recede from the camera. This is the standard mode for game and visualisation rendering.
ORTHOGRAPHICObjects 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
ValueDescription
POINTEmits light equally in all directions from a single point in space.
DIRECTIONALEmits parallel light rays as if from an infinitely distant source (e.g., sunlight).
SPOTEmits a cone of light in a specified direction with inner and outer cone angles.
AREAA two-dimensional emissive surface; used in physically-based rendering.
VOLUMEVolumetric 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
ValueDescription
DIFFUSEAlbedo / base colour texture channel. The most commonly used channel.
SPECULARSpecular colour or intensity texture channel.
AMBIENTAmbient light colour override texture.
EMISSIVESelf-illumination / emission texture channel.
NORMALTangent-space normal map channel.
BUMPHeight-based bump map channel (used before normal maps were standard).
OPACITYAlpha / transparency mask channel.
GLOWGlow / bloom intensity texture channel.
REFLECTIONEnvironment reflection texture channel.
SHADOWShadow projection texture channel.
SHININESSSpecular exponent / roughness map channel.
DISPLACEMENTGeometry 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
ValueDescription
ADDUnion: the result is the combined volume of both operands.
SUBSubtraction: the volume of the second operand is removed from the first.
INTERSECTIntersection: 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
ValueDescription
NORMALSurface normal vectors.
UVTexture UV coordinates.
VERTEX_COLORPer-vertex RGBA colour.
TANGENTTangent vectors for normal mapping.
BINORMALBinormal (bitangent) vectors.
SMOOTHING_GROUPPer-polygon smoothing group integer IDs.
MATERIALPer-polygon material index.
POLYGON_GROUPPolygon grouping index.
VERTEX_CREASESubdivision vertex crease weights.
EDGE_CREASESubdivision edge crease weights.
USER_DATAArbitrary user-defined data.
VISIBILITYPer-element visibility flags.
SPECULARSpecular colour or intensity.
WEIGHTBlend weights for skinning.
HOLEPolygon hole flags.

MappingMode

Controls which geometry primitive each vertex element value is associated with. See also: VertexElement reference.

from aspose.threed.entities import MappingMode
ValueDescription
CONTROL_POINTOne value per control point (vertex).
POLYGON_VERTEXOne value per polygon corner (face-vertex).
POLYGONOne value per polygon.
EDGEOne value per edge.
ALL_SAMEA 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
ValueDescription
DIRECTData is accessed sequentially without a separate indices array.
INDEXData is accessed via a separate indices array.
INDEX_TO_DIRECTAn indices array maps each mapping primitive to a position in the data array.

See Also