|
ModelUtils Class |
ModelUtils class contains static methods that can process ModelNode objects that are children of a GroupNode.
Inheritance Hierarchy Namespace: Ab4d.SharpEngine.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax public static class ModelUtils
The ModelUtils type exposes the following members.
Methods | Name | Description |
---|
| ChangeBackMaterial |
ChangeMaterial method changes BackMaterial (and preserves Material) on all child models of the specified groupNode.
|
| ChangeMaterial(SceneNode, Material) |
ChangeMaterial method changes Material (and preserves BackMaterial) on all child models of the specified groupNode.
|
| ChangeMaterial(SceneNode, Material, Material) |
ChangeMaterial method changes Material and BackMaterial on all child models of the specified sceneNode (or on the specified ModelNode if it is specified as sceneNode).
|
| CountAllPositions |
CountAllPositions method returns the total number of all positions that are defined in ModelNodes that are children of the specified GroupNode.
|
| CountAllTriangles |
CountAllTriangles method returns the total number of all triangles that are defined in ModelNodes that are children of the specified GroupNode.
|
| GetModelTranslationVector |
GetModelTranslationVector returns a Vector3 that defines how much the model with modelBounds needs to be translated in order to be positioned at a targetPosition that represents a targetPositionType.
|
| PositionAndScaleSceneNode |
PositionAndScaleSceneNode method translates and scales the sceneNode so that it is positioned according to position and positionType parameters
and that it will fit into the size defined by finalSize parameter.
This method may call Update method in case the BoundingBox is Empty.
|
| PositionSceneNode |
PositionSceneNode method translates the sceneNode so that it is positioned according to position and positionType parameters.
This method may call Update method in case the BoundingBox is Empty.
|
| ReplaceMaterial |
Goes through all models and replaces the materialToFind with newMaterial.
When isBackMaterial is set to true, BackMaterial is replaced instead of Material.
|
| SetCustomRenderingLayer |
Sets the CustomRenderingLayer on all child models of the specified sceneNode (or on the specified ModelNode if it is specified as sceneNode).
|
| SetMaterialOpacity |
Goes through all models in the models hierarchy that start with the specified sceneNode and sets the Opacity Materials and BackMaterials to the specified opacity value.
Materials need to be defined as StandardMaterial objects.
|
| SliceGroupNode(Plane, GroupNode) |
Slices the specified GroupNode with the specified Plane and returns two new GroupNode objects:
one GroupNode that is in front of the plane (in the direction of plane's Normal vector) and one GroupNode that is in the back of the plane.
If the specified GroupNode is fully in front (or in back) of the Plane, then the same instance of GroupNode is returned (the other returned GroupNode is null).
If the specified GroupNode intersects the Plane, it is sliced and new GroupNode objects are created from it.
|
| SliceGroupNode(Plane, GroupNode, Transform) |
Slices the specified GroupNode with the specified Plane and returns two new GroupNode objects:
one GroupNode that is in front of the plane (in the direction of plane's Normal vector) and one GroupNode that is in the back of the plane.
If the specified GroupNode is fully in front (or in back) of the Plane, then the same instance of GroupNode is returned (the other returned GroupNode is null).
If the specified GroupNode intersects the Plane, it is sliced and new GroupNode objects are created from it.
|
| SliceModelNode(Plane, ModelNode) |
Slices the specified ModelNode with the specified Plane and returns two new MeshModelNode objects:
one MeshModelNode that is in front of the plane (in the direction of plane's Normal vector) and one MeshModelNode that is in the back of the plane.
If the specified ModelNode is fully in front (or in back) of the Plane, then the same instance of ModelNode is returned (the other returned GroupNode is null).
If the specified ModelNode intersects the Plane, it is sliced and new MeshModelNode objects are created from it.
|
| SliceModelNode(Plane, ModelNode, Transform) |
Slices the specified ModelNode with the specified Plane and returns two new MeshModelNode objects:
one MeshModelNode that is in front of the plane (in the direction of plane's Normal vector) and one MeshModelNode that is in the back of the plane.
If the specified ModelNode is fully in front (or in back) of the Plane, then the same instance of ModelNode is returned (the other returned GroupNode is null).
If the specified ModelNode intersects the Plane, it is sliced and new MeshModelNode objects are created from it.
|
| SliceSceneNode(Plane, SceneNode) |
Slices the specified SceneNode with the specified Plane and returns two new SceneNode objects:
one SceneNode that is in front of the plane (in the direction of plane's Normal vector) and one SceneNode that is in the back of the plane.
If the specified SceneNode is fully in front (or in back) of the Plane, then the same instance of SceneNode is returned (the other returned SceneNode is null).
If the specified SceneNode intersects the Plane, it is sliced and new SceneNode objects are created from it.
|
| SliceSceneNode(Plane, SceneNode, Transform) |
Slices the specified SceneNode with the specified Plane and returns two new SceneNode objects:
one SceneNode that is in front of the plane (in the direction of plane's Normal vector) and one SceneNode that is in the back of the plane.
If the specified SceneNode is fully in front (or in back) of the Plane, then the same instance of SceneNode is returned (the other returned SceneNode is null).
If the specified SceneNode intersects the Plane, it is sliced and new SceneNode objects are created from it.
|
TopSee Also