Click or drag to resize
Ab4d.SharpEngine logo

ModelUtils Methods

The ModelUtils type exposes the following members.

Methods
 NameDescription
Public methodStatic memberChangeBackMaterial ChangeMaterial method changes BackMaterial (and preserves Material) on all child models of the specified groupNode.
Public methodStatic memberChangeMaterial(SceneNode, Material) ChangeMaterial method changes Material (and preserves BackMaterial) on all child models of the specified groupNode.
Public methodStatic memberChangeMaterial(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).
Public methodStatic memberCountAllPositions CountAllPositions method returns the total number of all positions that are defined in ModelNodes that are children of the specified GroupNode.
Public methodStatic memberCountAllTriangles CountAllTriangles method returns the total number of all triangles that are defined in ModelNodes that are children of the specified GroupNode.
Public methodStatic memberGetModelTranslationVector 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.
Public methodStatic memberPositionAndScaleSceneNode 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.
Public methodStatic memberPositionSceneNode 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.
Public methodStatic memberReplaceMaterial Goes through all models and replaces the materialToFind with newMaterial. When isBackMaterial is set to true, BackMaterial is replaced instead of Material.
Public methodStatic memberSetCustomRenderingLayer Sets the CustomRenderingLayer on all child models of the specified sceneNode (or on the specified ModelNode if it is specified as sceneNode).
Public methodStatic memberSetMaterialOpacity 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.
Public methodStatic memberSliceGroupNode(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.
Public methodStatic memberSliceGroupNode(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.
Public methodStatic memberSliceModelNode(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.
Public methodStatic memberSliceModelNode(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.
Public methodStatic memberSliceSceneNode(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.
Public methodStatic memberSliceSceneNode(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.
Top
See Also