struct CCL::IGeometry3D

Overview

3D geometry interface. More…

#include <imodel3d.h>

struct IGeometry3D: public CCL::IGeometrySource3D
{
    // methods

    virtual tresult CCL_API setVertexData (
        const PointF3D positions [],
        const PointF3D normals [],
        const PointF textureCoords [],
        uint32 count
    ) = 0;

    virtual tresult CCL_API setIndices (const uint32 indices [], uint32 count) = 0;
    virtual void CCL_API setPrimitiveTopology (PrimitiveTopology3D topology) = 0;
    virtual PrimitiveTopology3D CCL_API getPrimitiveTopology () const = 0;
    virtual IBufferSegment3D*CCL_API getVertexBufferSegment () const = 0;
    virtual IBufferSegment3D*CCL_API getIndexBufferSegment () const = 0;
    virtual tresult CCL_API getBoundingSphere (BoundingSphere3D& sphere) = 0;
    virtual tresult CCL_API setCustomBoundingSphere (BoundingSphere3DRef sphere) = 0;
    IGeometry3D void copyFrom (const IGeometrySource3D& source);
};

Inherited Members

public:
    // methods

    virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0;
    virtual unsigned int CCL_API retain () = 0;
    virtual unsigned int CCL_API release () = 0;
    virtual uint32 CCL_API getVertexCount () const = 0;
    virtual uint32 CCL_API getIndexCount () const = 0;
    virtual const PointF3D*CCL_API getPositions () const = 0;
    virtual const PointF3D*CCL_API getNormals () const = 0;
    virtual const PointF*CCL_API getTextureCoords () const = 0;
    virtual const uint32*CCL_API getIndices () const = 0;

Detailed Documentation

3D geometry interface.

Classes implementing this interface also implement IGraphicsResource3D.

Methods

virtual tresult CCL_API setVertexData (
    const PointF3D positions [],
    const PointF3D normals [],
    const PointF textureCoords [],
    uint32 count
) = 0

Set vertex data.

virtual tresult CCL_API setIndices (const uint32 indices [], uint32 count) = 0

Set indices.

virtual void CCL_API setPrimitiveTopology (PrimitiveTopology3D topology) = 0

Set primitive type.

virtual PrimitiveTopology3D CCL_API getPrimitiveTopology () const = 0

Get primitive type.

virtual IBufferSegment3D*CCL_API getVertexBufferSegment () const = 0

Get vertex buffer segment, valid when uploaded to graphics memory.

virtual IBufferSegment3D*CCL_API getIndexBufferSegment () const = 0

Get index buffer, valid when uploaded to graphics memory.

virtual tresult CCL_API getBoundingSphere (BoundingSphere3D& sphere) = 0

Get a sphere encasing all vertices of this geometry.

virtual tresult CCL_API setCustomBoundingSphere (BoundingSphere3DRef sphere) = 0

Set a custom bounding sphere.