TriangleMeshPrimitive#
- class ansys.stk.core.graphics.TriangleMeshPrimitive#
Bases:
IPrimitive
Render a triangle mesh in the 3D scene. Examples of triangle meshes include polygons on the globe (e.g. states or countries), terrain and imagery extents, ellipses, and extrusions.
Overview#
Define the triangle mesh using an indexed triangle list specified by positions, normals, and indices. The mesh is rendered in the primitive’s reference frame. |
|
Define the triangle mesh using an indexed triangle list specified by positions, normals, indices, and optionalParameters. The mesh is rendered in the primitive’s reference frame. |
|
Define the triangle mesh using the specified triangulator. The mesh is rendered in the primitive’s reference frame. |
Get or set whether the primitive is rendered in wireframe. This is useful for debugging. |
|
Get or set whether the primitive is rendered in two passes to improve the visual quality for translucent, convex meshes. |
|
Get or set whether the primitive is lit. |
|
Get or set the orientation of front-facing triangles. This is used in combination with cull face for culling. |
|
Get or set whether front and/or back-facing triangles may be culled. This is used in combination with triangle winding order for culling. |
|
Get or set the shading model for the mesh. |
|
Get or set the texture to be drawn on the triangle mesh. Textures can be obtained from textures. |
|
Get or set the filter used for the texture associated with this triangle mesh. |
|
Get the primitive’s set hint. See the Set Hint Performance Overview for selecting an appropriate value to construct the primitive with. |
|
Get or set whether individual points will be clipped by the central body. |
|
Get or set whether the primitive’s translucent geometry will be lit from both sides of the surface. |
Import detail#
from ansys.stk.core.graphics import TriangleMeshPrimitive
Property detail#
- property TriangleMeshPrimitive.wireframe: bool#
Get or set whether the primitive is rendered in wireframe. This is useful for debugging.
- property TriangleMeshPrimitive.render_back_then_front_faces: bool#
Get or set whether the primitive is rendered in two passes to improve the visual quality for translucent, convex meshes.
- property TriangleMeshPrimitive.triangle_winding_order: WindingOrder#
Get or set the orientation of front-facing triangles. This is used in combination with cull face for culling.
- property TriangleMeshPrimitive.cull_face: FaceCullingMode#
Get or set whether front and/or back-facing triangles may be culled. This is used in combination with triangle winding order for culling.
- property TriangleMeshPrimitive.shade_model: RendererShadingModel#
Get or set the shading model for the mesh.
- property TriangleMeshPrimitive.texture: RendererTexture2D#
Get or set the texture to be drawn on the triangle mesh. Textures can be obtained from textures.
- property TriangleMeshPrimitive.texture_filter: TextureFilter2D#
Get or set the filter used for the texture associated with this triangle mesh.
- property TriangleMeshPrimitive.set_hint: SetHint#
Get the primitive’s set hint. See the Set Hint Performance Overview for selecting an appropriate value to construct the primitive with.
Method detail#
- TriangleMeshPrimitive.set(self, positions: list, normals: list, indices: list) None #
Define the triangle mesh using an indexed triangle list specified by positions, normals, and indices. The mesh is rendered in the primitive’s reference frame.
- TriangleMeshPrimitive.set_with_optional_parameters(self, positions: list, normals: list, indices: list, optional_parameters: TriangleMeshPrimitiveOptionalParameters) None #
Define the triangle mesh using an indexed triangle list specified by positions, normals, indices, and optionalParameters. The mesh is rendered in the primitive’s reference frame.
- TriangleMeshPrimitive.set_triangulator(self, triangulator: ITriangulatorResult) None #
Define the triangle mesh using the specified triangulator. The mesh is rendered in the primitive’s reference frame.
- Parameters:
triangulator :
ITriangulatorResult
- Returns: