Content


NTL
Core
IModel

IModel


This interface describes a hierarchical object transformations in 3D space.

You can find more information in comments below.

class IModel : public virtual IReleasable, public virtual ITransformable
{
protected:
    IModel *m_pParent;
    bool m_bAcceptParent;
    bool m_bAcceptModels;
public:
    IModel* const &Parent; // Parent model
    bool const &AcceptParent; // Whether it can be attached to another model
    bool const &AcceptModels; // Whether another models can be attached to this one

    virtual int getModelCount() const = 0; // Return count of attached model
    virtual IModel *getModel(const int index) = 0; // Return attached model by index
    virtual bool hasModel(IModel *value) const = 0; // Check whether specified model exists in hierarchy
    virtual const Mat4f &getModelMatrix() = 0; // Return model matrix
    virtual const Mat3f &getNormalMatrix() = 0; // Return normal matrix
    virtual bool isAcceptParent(IModel *parent) = 0; // Check whether it cane be attached to specified parent
    virtual bool isAcceptModel(IModel *model) = 0; // Check whether specified model can be attached to this one

    virtual bool setParent(IModel *value) = 0; // Attach this model to specified parent

    virtual IModelService *QueryService() = 0; // Return model service

    virtual size_t AddModel(IModel *model) = 0; // Add model to list
    virtual bool DetachModel(const int index) = 0; // Detach model from list by index
    virtual bool DetachModel(IModel *model) = 0; // Detach model from list
    virtual bool DeleteModel(const int index) = 0; // Delete model from list by index
    virtual bool DeleteModel(IModel *model) = 0; // Delete model from list
    virtual bool DeleteModels() = 0; // Delete all child models
};
Namespace: nitisa
Include: Nitisa/Interfaces/IModel.h