Skip to content
Alessandro Febretti edited this page Feb 8, 2014 · 12 revisions

module cyclops wraps cyclops::ModelInfo

Last revision: ver. 4.1-alpha2 - 1 Jul 2013

Contains the name of a model to load and load options.

Properties

Properties Description
string name The unique name for this model
string description A description for this model. Can be used in user interfaces
bool generateNormals when set to True, cyclops will generate normals for the loaded model
bool generateTangents when set to True, cyclops will generate tangents for the loaded model. Tangents are used for tangent space computations in bump shaders and effects
int numFiles If set to a value other than 1, cyclops will attempt to load multiple models the string %1 in the model path will be substituded by a model index
string path The relative path to the model. File lookup follows the rules defined in Filesystem
size The size of the loaded model in meters. If left to 0, the original model size will be preserved
bool optimize When set to True cyclops will perform some optimizations on the loaded model to increase rendering performance. This is a recommended setting.
bool usePowerOfTwoTextures When set to True non-power-of-two textures will e converted to power of two. Can be usually left set to false.
string loaderOutput Optional output string generated by the loader, containing information on the loaded object (like number of vertices, etc.). The output should be in JSON format when present. The data fields in the output are determined by the loader used to load this model. See the BinaryPointsLoader::loadFile(ModelAsset* model, osg::Group * grp) in https://github.com/febret/omegalib/blob/master/modules/pointCloud/BinaryPointsLoader.cpp for an example of setting up loaderOutput. In python, strings in JSON format can easily be transformed into dictionaries using the eval command: dict = eval(modelinfo.loaderOutput)