|
Model | build (String filename) |
| Build model using filename. More...
|
|
void | buildModel () |
| Build model. More...
|
|
void | addTexture (String name, Point size, bool doubleSided, bool decal, int decalOffset) |
| Add texture. More...
|
|
void | addTextureCoordinatesSet (String name) |
| Add texture coordinate set. More...
|
|
void | addLOD () |
| Add LOD. More...
|
|
void | setLodError (int lod, float error) |
| Set lod error. More...
|
|
void | setWeightCount (int lod, int count) |
| Set weight count. More...
|
|
void | setWeightAt (int lod, int index, int bone, float weight) |
| Set weight. More...
|
|
void | setWeightGroupCount (int lod, int count) |
| Set weight group count. More...
|
|
void | setWeightGroupAt (int lod, int index, int count) |
| Set weight group. More...
|
|
void | setVertexCount (int lod, int count) |
| Set vertex count. More...
|
|
void | setVertexAt (int lod, int index, Vector position, int weightSet) |
| Set vertex. More...
|
|
void | setNormalCount (int lod, int count) |
| Set normal count. More...
|
|
void | setTangentCount (int lod, int count) |
| Set tangent count. More...
|
|
void | setFaceCount (int lod, int count) |
| Set face count. More...
|
|
void | setFaceAt (int lod, int index, int texture, int vertex1, int vertex2, int vertex3, int normal1, int normal2, int normal3, int tangent1, int tangent2, int tangent3, int texCoord1, int texCoord2, int texCoord3, Vector faceNormal, Vector faceTangent) |
| Set face. More...
|
|
void | setTextureCoordinateSetCount (int lod, int count) |
| Set texture coordinates set count. More...
|
|
void | setTextureCoordinateSetAtSetCount (int lod, int index, int count) |
| Texture coordinate set set texture coordinate count. More...
|
|
void | setTextureCoordinateSetAtSetAt (int lod, int index, int index2, Vector2 tc) |
| Texture coordinate set set texture coordinate. More...
|
|
Model builder.
Builds model resource without requiring a model resource file. The created model can either be unnamed (if filename is empty string) or named (if filename is not empty string). Named models can not clash with filenames present in the virtual file system. For this reason use unnamed models if possible. Using named models though can be useful if you want to provide model resources to scripts not needing to know if the path they try to load is a build model instead of a resource one.
To use the model builder create a subclass and implement ModelBuilder.buildModel() . You are only allowed to call methods from ModelBuilder from inside this function call. To create the model call ModelBuilder.build() . This will call ModelBuilder.buildModel() to fill a new model resource with content. Once finished the build method returns the ready to use model resource. Otherwise an exception is thrown.
This is a native class.
Model Dragengine.Scenery.ModelBuilder.build |
( |
String |
filename | ) |
|
Build model using filename.
The created model can either be unnamed (if filename is empty string) or named (if filename is not empty string). Named models can not clash with filenames present in the virtual file system. For this reason use unnamed models if possible. Using named models though can be useful if you want to provide model resources to scripts not needing to know if the path they try to load is a build model instead of a resource one.
To create the model call build() . This will call buildModel() to fill a new model resource with content. Once finished the build method returns the ready to use model resource. Otherwise an exception is thrown.