Moray Plugin SDK Documentation
This release of the Plugin SDK can be used by Moray V3.5 (Build 9065) and later.

Scene Interface Files Interface Menu Interface Import Interface
Export Interface Object Interface Controller Interface External Interface
Data Structures C++ Support Compiler Settings

What's New

Data Structures

This file documents the structs that are defined for the plugin system.

Reference List of Functions

By Function Group Alphabetically
MRY_OBJ_TRANSFORMS
MRY_OBJ_TRANSFORM_LOCKS
MRY_OBJ_ATTRIBUTES
MRY_OBJ_SPECIFIC
MRY_OBJ_LAYERS
MRY_OBJ_WIREFRAME_INFO
MRY_WIREFRAME_BUILDING
MRY_MSH_TRIANGLE_EXT
MRY_MSH_QUAD_EXT
MRY_MSH_FACE
MRY_OBJ_TRIANGLE_EXT
MRY_OBJ_QUAD_EXT
MRY_WIREFRAME_BUILDING.fnGetWireInfo
MRY_WIREFRAME_BUILDING.fnAllocateMemory
MRY_WIREFRAME_BUILDING.fnPolygonCountHint
MRY_WIREFRAME_BUILDING.fnAddVertices
MRY_WIREFRAME_BUILDING.fnAddVertex
MRY_WIREFRAME_BUILDING.fnAddNormals
MRY_WIREFRAME_BUILDING.fnAddNormal
MRY_WIREFRAME_BUILDING.fnAddUVCoords
MRY_WIREFRAME_BUILDING.fnAddUVCoord
MRY_WIREFRAME_BUILDING.fnAddEdges
MRY_WIREFRAME_BUILDING.fnAddEdge
MRY_WIREFRAME_BUILDING.fnAddTriangle
MRY_WIREFRAME_BUILDING.fnAddQuad
MRY_WIREFRAME_BUILDING.fnSetTriangleNormals
MRY_WIREFRAME_BUILDING.fnSetQuadNormals
MRY_WIREFRAME_BUILDING.fnSetTriangleUVCoords
MRY_WIREFRAME_BUILDING.fnSetQuadUVCoords
MRY_WIREFRAME_BUILDING.fnSetTriangleMaterial
MRY_WIREFRAME_BUILDING.fnSetQuadMaterial
MRY_WIREFRAME_BUILDING.fnAddMeshTriangle
MRY_WIREFRAME_BUILDING.fnAddMeshQuad
MRY_WIREFRAME_BUILDING.fnGetVertex
MRY_WIREFRAME_BUILDING.fnGetNormal
MRY_WIREFRAME_BUILDING.fnGetUVCoord
MRY_WIREFRAME_BUILDING.fnGetEdge
MRY_WIREFRAME_BUILDING.fnGetTriangle
MRY_WIREFRAME_BUILDING.fnGetQuad
MRY_WIREFRAME_BUILDING.fnModifyVertex
MRY_WIREFRAME_BUILDING.fnModifyNormal
MRY_WIREFRAME_BUILDING.fnModifyUVCoord
MRY_WIREFRAME_BUILDING.fnModifyEdge
MRY_WIREFRAME_BUILDING.fnModifyTriangle
MRY_WIREFRAME_BUILDING.fnModifyQuad
MRY_WIREFRAME_BUILDING.fnGetWireFaceInfo
MRY_WIREFRAME_BUILDING.fnGetFace
MRY_WIREFRAME_BUILDING.fnAddFace
MRY_WIREFRAME_BUILDING.fnModifyFace
MRY_WIREFRAME_BUILDING.fnGenerateNormals
MRY_WIREFRAME_BUILDING.fnGenerateEdges
MRY_TEXTURE_DATA
MRY_TEX_COLORMAP_ENTRY
MRY_TEX_CREATE_PARAMS
MRY_CONTROL_INFO
MRY_MENU_COMMAND
MRY_MNU_ITEMSTATE
MRY_VECTOR
MRY_MSH_TRIANGLE
MRY_MSH_TRIANGLE_INDECES
MRY_SWEEP_NODE
MRY_BLOB_COMPONENT
MRY_BEZIER_CTRLPOINT
MRY_BEZIER_PATCH
MRY_VERTEXEDGE
MRY_POINTS2D
MRY_VIEW_BITMAP
MRY_SCN_VIEWINFO
MRY_SCN_VIEWINFO.fnDrawLine2D
MRY_SCN_VIEWINFO.fnSetPixel2D
MRY_SCN_VIEWINFO.fnSetMultiplePixels2D
MRY_SCN_VIEWINFO.fnDrawPolyLine2D
MRY_SCN_VIEWINFO.fnFillBlock2D
MRY_SCN_VIEWINFO.fnGetBitmapBits2D
MRY_SCN_VIEWINFO.fnGetWorldCoord
MRY_SCN_VIEWINFO.fnSnapWorldCoord
MRY_SCN_VIEWINFO.fnGetScreenCoord
MRY_SCN_VIEWINFO.fnZoomToFit
MRY_SCN_VIEWINFO.fnWriteString
MRY_SCN_VIEW_SCREEN_SPACE
MRY_SCN_UNDO_INFO
MRY_SCN_LAYERINFO
MRY_PROGRESS_DATA
MRY_RENDER_OPTIONS
MRY_DLLINTERFACE
MRY_DLLINFO
MRY_INTERFACE
MRY_INTERFACEID
MRY_OBJECTFUNCS
MRY_SCENEFUNCS
MRY_FILESFUNCS
MRY_IMPORTFUNCS
MRY_EXPORTFUNCS
MRY_MENUFUNCS
MRY_CONTROLLERFUNCS
MRY_EXTERNALFUNCS
MRY_SCN_SETTINGS
MRY_SCN_SETTINGS.fnGetLayer
MRY_SCN_SETTINGS.fnModifyLayer
MRY_SCN_SETTINGS.fnAddLayer
MRY_SCN_SETTINGS.fnSetFog
MRY_SCN_SETTINGS.fnGetFog
MRY_SCN_FOG
MRY_SCN_PHOTONS
MRY_BEZIER_CTRLPOINT
MRY_BEZIER_PATCH
MRY_BLOB_COMPONENT
MRY_CONTROLLERFUNCS
MRY_CONTROL_INFO
MRY_DLLINFO
MRY_DLLINTERFACE
MRY_EXPORTFUNCS
MRY_EXTERNALFUNCS
MRY_FILESFUNCS
MRY_IMPORTFUNCS
MRY_INTERFACE
MRY_INTERFACEID
MRY_MENUFUNCS
MRY_MENU_COMMAND
MRY_MNU_ITEMSTATE
MRY_MSH_FACE
MRY_MSH_QUAD_EXT
MRY_MSH_TRIANGLE
MRY_MSH_TRIANGLE_EXT
MRY_MSH_TRIANGLE_INDECES
MRY_OBJECTFUNCS
MRY_OBJ_ATTRIBUTES
MRY_OBJ_LAYERS
MRY_OBJ_QUAD_EXT
MRY_OBJ_SPECIFIC
MRY_OBJ_TRANSFORMS
MRY_OBJ_TRANSFORM_LOCKS
MRY_OBJ_TRIANGLE_EXT
MRY_OBJ_WIREFRAME_INFO
MRY_POINTS2D
MRY_PROGRESS_DATA
MRY_RENDER_OPTIONS
MRY_SCENEFUNCS
MRY_SCN_FOG
MRY_SCN_LAYERINFO
MRY_SCN_PHOTONS
MRY_SCN_SETTINGS
MRY_SCN_SETTINGS.fnAddLayer
MRY_SCN_SETTINGS.fnGetFog
MRY_SCN_SETTINGS.fnGetLayer
MRY_SCN_SETTINGS.fnModifyLayer
MRY_SCN_SETTINGS.fnSetFog
MRY_SCN_UNDO_INFO
MRY_SCN_VIEWINFO
MRY_SCN_VIEWINFO.fnDrawLine2D
MRY_SCN_VIEWINFO.fnDrawPolyLine2D
MRY_SCN_VIEWINFO.fnFillBlock2D
MRY_SCN_VIEWINFO.fnGetBitmapBits2D
MRY_SCN_VIEWINFO.fnGetScreenCoord
MRY_SCN_VIEWINFO.fnGetWorldCoord
MRY_SCN_VIEWINFO.fnSetMultiplePixels2D
MRY_SCN_VIEWINFO.fnSetPixel2D
MRY_SCN_VIEWINFO.fnSnapWorldCoord
MRY_SCN_VIEWINFO.fnWriteString
MRY_SCN_VIEWINFO.fnZoomToFit
MRY_SCN_VIEW_SCREEN_SPACE
MRY_SWEEP_NODE
MRY_TEXTURE_DATA
MRY_TEX_COLORMAP_ENTRY
MRY_TEX_CREATE_PARAMS
MRY_VECTOR
MRY_VERTEXEDGE
MRY_VIEW_BITMAP
MRY_WIREFRAME_BUILDING
MRY_WIREFRAME_BUILDING.fnAddEdge
MRY_WIREFRAME_BUILDING.fnAddEdges
MRY_WIREFRAME_BUILDING.fnAddFace
MRY_WIREFRAME_BUILDING.fnAddMeshQuad
MRY_WIREFRAME_BUILDING.fnAddMeshTriangle
MRY_WIREFRAME_BUILDING.fnAddNormal
MRY_WIREFRAME_BUILDING.fnAddNormals
MRY_WIREFRAME_BUILDING.fnAddQuad
MRY_WIREFRAME_BUILDING.fnAddTriangle
MRY_WIREFRAME_BUILDING.fnAddUVCoord
MRY_WIREFRAME_BUILDING.fnAddUVCoords
MRY_WIREFRAME_BUILDING.fnAddVertex
MRY_WIREFRAME_BUILDING.fnAddVertices
MRY_WIREFRAME_BUILDING.fnAllocateMemory
MRY_WIREFRAME_BUILDING.fnGenerateEdges
MRY_WIREFRAME_BUILDING.fnGenerateNormals
MRY_WIREFRAME_BUILDING.fnGetEdge
MRY_WIREFRAME_BUILDING.fnGetFace
MRY_WIREFRAME_BUILDING.fnGetNormal
MRY_WIREFRAME_BUILDING.fnGetQuad
MRY_WIREFRAME_BUILDING.fnGetTriangle
MRY_WIREFRAME_BUILDING.fnGetUVCoord
MRY_WIREFRAME_BUILDING.fnGetVertex
MRY_WIREFRAME_BUILDING.fnGetWireFaceInfo
MRY_WIREFRAME_BUILDING.fnGetWireInfo
MRY_WIREFRAME_BUILDING.fnModifyEdge
MRY_WIREFRAME_BUILDING.fnModifyFace
MRY_WIREFRAME_BUILDING.fnModifyNormal
MRY_WIREFRAME_BUILDING.fnModifyQuad
MRY_WIREFRAME_BUILDING.fnModifyTriangle
MRY_WIREFRAME_BUILDING.fnModifyUVCoord
MRY_WIREFRAME_BUILDING.fnModifyVertex
MRY_WIREFRAME_BUILDING.fnPolygonCountHint
MRY_WIREFRAME_BUILDING.fnSetQuadMaterial
MRY_WIREFRAME_BUILDING.fnSetQuadNormals
MRY_WIREFRAME_BUILDING.fnSetQuadUVCoords
MRY_WIREFRAME_BUILDING.fnSetTriangleMaterial
MRY_WIREFRAME_BUILDING.fnSetTriangleNormals
MRY_WIREFRAME_BUILDING.fnSetTriangleUVCoords



 

MRY_OBJ_TRANSFORMS


   struct MRY_OBJ_TRANSFORMS;

The struct MRY_OBJ_TRANSFORMS is used by the Scene Interface functions SetTransforms and GetTransforms functions to set and retrieve transformations of objects.

The MRY_OBJ_TRANSFORMS struct has the following members:

The additional transformations are exported before the normal transformations and before the texture of the object is exported.

Note for Cameras:

Note for Matrix:

The adFinalMatrix array contains the final transformation for this object. This is what transforms the object from its origin to its final world position, including all parent, local coordinate and object transformations.

If this is the matrix of the object:

a11 a21 a31 a41
a12 a22 a32 a42
a13 a23 a33 a43
a14 a24 a34 a44

The array is ordered like this: a11, a21, a31, a41, a12, a22, a32, a42, a13, a23, a33, a43, a14, a24, a34, a44

Note that a41, a42 and a43 are always 0 and a44 is always 1. a14, a24 and a34 contain the translation parameters.

See Also

SetTransforms, GetTransforms


Top
 

MRY_OBJ_TRANSFORM_LOCKS


   struct MRY_OBJ_TRANSFORM_LOCKS;

The struct MRY_OBJ_TRANSFORM_LOCKS is used by the Scene Interface functions SetTransformLocks and GetTransformLocks functions to set and retrieve transformation locks of objects.

The nine transformation values of objects can be limited to a range of values or locked to a certain value. This allows the designer to create scenes that are very easy to animate.

The MRY_OBJ_TRANSFORM_LOCKS struct has the following members:

If the lLockState has a value of MRY_LCK_ALL_AXES_LOCKED, then the object is completely locked (i.e. frozen).

Examples:

See Also

SetTransformLocks, GetTransformLocks


Top
 

MRY_OBJ_ATTRIBUTES


   struct MRY_OBJ_ATTRIBUTES;

The struct MRY_OBJ_ATTRIBUTES is used by the Scene Interface SetAttributes and GetAttributes functions to set and retrieve attributes of objects.

The MRY_OBJ_ATTRIBUTES struct has the following members:


Top
 

MRY_OBJ_SPECIFIC


   struct MRY_OBJ_SPECIFIC;

The struct MRY_OBJ_SPECIFIC is used by the Scene Interface SetAttributes and GetAttributes functions to set and retrieve object-specific information about an object. A pointer to this structure is used in the MRY_OBJ_ATTRIBUTES structure.

The MRY_OBJ_SPECIFIC struct has the following members:



The rest is a union of structs that hold information according to the nObjectType member of the MRY_OBJ_ATTRIBUTES struct that this struct is attached to.

See Also

MRY_OBJ_ATTRIBUTES, SetAttributes, GetAttributes


Top
 

NEW!MRY_OBJ_LAYERS


   struct MRY_OBJ_LAYERS;

The struct MRY_OBJ_LAYERS is used by the Scene Interface SetAttributes and GetAttributes functions to set and retrieve layer information of objects.

The MRY_OBJ_LAYERS struct has the following members:

See Also

MRY_OBJ_ATTRIBUTES, SetAttributes, GetAttributes


Top
 

NEW!MRY_OBJ_WIREFRAME_INFO


   struct MRY_OBJ_WIREFRAME_INFO;

The struct MRY_OBJ_WIREFRAME_INFO is no longer available and has been replaced by the MRY_WIREFRAME_BUILDING struct.

See Also

RetrieveWireframeInfo, MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_WIREFRAME_BUILDING


   struct MRY_WIREFRAME_BUILDING;

The struct MRY_WIREFRAME_BUILDING is used to create, retrieve and modify the wireframe representation of objects. It also replaces the MRY_OBJ_WIREFRAME_INFO struct that was previously used by the Object Interface It is used by the BuildMeshWireframe function of the Object Interface to build the wireframe of a plugin object.

The MRY_WIREFRAME_BUILDING struct contains the following members:

The next set of functions allow you to retrieve and modify the individual elements, but are superceded by the face functions that follow after them. Each function is described in its own section below.

The rest of the struct contains NEW! functions that allow you to add, modify and retrieve faces, regardless of whether they are triangles or quads. It is strongly recommended that these interface functions are used if available (nVersion>200). Each function is described in its own section below.


There are two new ways to build the solid wireframe of a plugin object (i.e. one that is defined by a MRY_OBJECT interface).

When this struct is used in the Scene Interface, i.e. in a GetAttributes() call, the fnGet....() and fnModify....() functions allow you to retrieve and change the wireframe of an object. Note that this will not work for the primitives, since these are regenerated from time to time and some of them (sphere, cube, etc.) share vertex information. Note that some of the values can be zero. For example, some objects may not have normals or triangles or quads. In fact some objects may not have any vertices. Unevaluated CSG objects will always return zero for the number of vertices and edges.

Note that all indeces are zero-based.

See the SAMPLES plugin for an example of how to retrieve the wireframe data.

See Also

RetrieveWireframeInfo, GetAttributes


Top
 

NEW!MRY_MSH_TRIANGLE_EXT


   struct MRY_MSH_TRIANGLE_EXT;

The struct MRY_MSH_TRIANGLE_EXT is used by the fnGetTriangle and fnModifyTriangle functions of the MRY_WIREFRAME_BUILDING struct to retrieve and modify the triangles used in the polygon representation of an object.

The MRY_MSH_TRIANGLE_EXT struct has the following members:

See Also

MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_MSH_QUAD_EXT


   struct MRY_MSH_QUAD_EXT;

The struct MRY_MSH_QUAD_EXT is used by the fnGetQuad and fnModifyQuad functions of the MRY_WIREFRAME_BUILDING struct to retrieve and modify the quads used in the polygon representation of an object.

The MRY_MSH_QUAD_EXT struct has the following members:

See Also

MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_MSH_FACE


   struct MRY_MSH_FACE;

The struct MRY_MSH_FACE is used by the fnGetFace and fnModifyFace functions of the MRY_WIREFRAME_BUILDING struct to retrieve and modify the faces used in the polygon representation of an object.

The MRY_MSH_FACE struct has the following members:

See Also

MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_OBJ_TRIANGLE_EXT


   struct MRY_OBJ_TRIANGLE_EXT;

The struct MRY_OBJ_TRIANGLE_EXT is used by the fnAddMeshTriangle function of the MRY_WIREFRAME_BUILDING struct to add a triangle to the wireframe of an plugin object.

The MRY_OBJ_TRIANGLE_EXT struct has the following members:

Note that Moray uses counter-clockwise triangles, so it may be neccessary to invert the triangle for Moray to be able to use it properly. You can pass the MRY_OBJ_TRI_INVERTED flag in this struct to make Moray do the grunt work of inverting it for you.

See Also

MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_OBJ_QUAD_EXT


   struct MRY_OBJ_QUAD_EXT;

The struct MRY_OBJ_QUAD_EXT is used by the fnAddMeshQuad function of the MRY_WIREFRAME_BUILDING struct to add a quad to the wireframe of an plugin object.

The MRY_OBJ_QUAD_EXT struct has the following members:

Note that Moray uses counter-clockwise quads, so it may be neccessary to invert the quad for Moray to be able to use it properly. You can pass the MRY_OBJ_TRI_INVERTED flag in this struct to make Moray do the grunt work of inverting it for you.

See Also

MRY_WIREFRAME_BUILDING


Top
 

MRY_WIREFRAME_BUILDING.fnGetWireInfo

The function MRY_WIREFRAME_BUILDING.fnGetWireInfo is a member function of the MRY_WIREFRAME_BUILDING struct and retrieves info about the wireframe.

    long WINAPI fnGetWireInfo(long hWireFrameID, long *pnNumVertices, long *pnNumNormals, long *pnNumUVCoords, long *pnNumTriangles, long *pnNumQuads);

Parameters

hWireframeID

contains the handle of the wireframe that is being modified

pnNumVertices

contains a pointer to where the number of vertices should be written

pnNumNormals

contains a pointer to where the number of normals should be written

pnNumUVCoords

contains a pointer to where the number of UV coordinates should be written

pnNumTriangles

contains a pointer to where the number of triangles should be written

pnNumQuads

contains a pointer to where the number of quads should be written

Return Values

MRY_SUCCESS

if the structure was successfully filled.

MRY_ERR_NULL_POINTER

if hWireFrameID is NULL.

Remarks

This function is obsolete. Please use fnGetWireFaceInfo instead. If any of the pointers are NULL, the information will not be written.

See Also

MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnAllocateMemory

The function MRY_WIREFRAME_BUILDING.fnAllocateMemory is a member function of the MRY_WIREFRAME_BUILDING struct that tells Moray how much memory to allocate for the wireframe elements.

    long WINAPI fnAllocateMemory(long hWireframeID, long nNumVertices, long nNumEdges, long nNumNormals, long nNumUVCoords);

Parameters

hWireframeID

contains Morays handle of the wireframe being built.

nNumVertices

contains the exact number of vertices that this object will use. Moray allocates enough memory to hold exactly this amount.

nNumEdges

contains the exact number of edges that this object will use. Moray allocates enough memory to hold exactly this amount.

nNumNormals

contains the exact number of normals that this object will use. Moray allocates enough memory to hold exactly this amount.

nNumUVCoords

contains the exact number of UV coords that this object will use. Moray allocates enough memory to hold exactly this amount.

Return Values

MRY_SUCCESS

if the allocation was successful.

MRY_ERR_NULL_POINTER

if hWireframeID was NULL.

MRY_ERR_INTERNAL_ERROR

if something went very wrong.

MRY_ERR_OUT_OF_MEMORY

if not enough memory was available.

Remarks

Only nNumNormals and nNumUVCoords can be 0.


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnPolygonCountHint

The function MRY_WIREFRAME_BUILDING.fnPolygonCountHint is a member function of the MRY_WIREFRAME_BUILDING struct that function to tell Moray approximately how much memory to allocate for the polygon elements.

    long WINAPI fnPolygonCountHint(long hWireframeID, long nApproxTriangles, long nApproxQuads);

Parameters

hWireframeID

contains Morays handle of the wireframe being built.

nApproxTriangles

The approximate number of triangles the plugin will be creating for this object. See Remarks.

nApproxQuads

The approximate number of quads the plugin will be creating for this object. See Remarks.

Return Values

MRY_SUCCESS

if the allocation was successful.

MRY_ERR_NULL_POINTER

if hWireframeID was NULL.

MRY_ERR_OUT_OF_MEMORY

if not enough memory was available.

Remarks

NEW!You do not need to differentiate between triangles and quads. Simply pass in the number of faces as one of the arguments. The face list is dynamic and grows if it overflows. To prevent memory fragmentation and too many reallocations, this function allows the plugin to give a rough estimate of how many faces are likely to be created. Moray uses these numbers as initial values for memory allocation, allocating memory for at least 16 faces. The plugin should be on the safe side so that not too many reallocations need to occur. The array size is doubled everytime an overflow occurs.

If you do not intend to create triangles or quads, you do not need to call this function.


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnAddVertices

The function MRY_WIREFRAME_BUILDING.fnAddVertices is a member function of the MRY_WIREFRAME_BUILDING struct that adds one or more vertices to the wireframe.

    long WINAPI fnAddVertices(long hWireframeID, long nNumVertices, MRY_VECTOR *pvVertices);

Parameters

hWireframeID

contains Morays handle of the wireframe being built.

nNumVertices

the number of vertices that are to be added to the vertex list.

pvVertices

A pointer to an array of MRY_VECTORs that contain the vertices.

Return Values

MRY_SUCCESS

if the vertices were appended to the list.

MRY_ERR_NULL_POINTER

if hWireframeID was NULL.

MRY_ERR_INTERNAL_ERROR

if something went very wrong.

MRY_ERR_WIRE_TOO_MANY_VERTICES

if more vertices were passed in than were specified in the call to fnAllocateMemory.

Remarks

The vertices are appended to the end of the vertex list. It is up to the plugin to keep track of the indeces where vertices are being added (if the plugin needs to).

The vertices are copied from pvVertices, no memory is grabbed from the plugin. They are not shuffled about, so they stay in the same order in which the plugin passes them in.


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnAddVertex

The function MRY_WIREFRAME_BUILDING.fnAddVertex is a member function of the MRY_WIREFRAME_BUILDING struct that adds a single vertex to the wireframe.

    long WINAPI fnAddVertex(long hWireframeID, double dX, double dY, double dZ);

Parameters

hWireframeID

contains Morays handle of the wireframe being built.

dX, dY, dZ

The coordinates of the vertex to be added.

Return Values

MRY_SUCCESS

if the vertex was appended to the list.

MRY_ERR_NULL_POINTER

if hWireframeID was NULL.

MRY_ERR_INTERNAL_ERROR

if something went very wrong.

MRY_ERR_WIRE_TOO_MANY_VERTICES

if more vertices were passed in than were specified in the call to fnAllocateMemory.

Remarks

The vertex is appended to the end of the vertex list. It is up to the plugin to keep track of the indeces where vertices are being added (if the plugin needs to).

The vertices are not shuffled about, they stay in the same order in which the plugin passes them in.


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnAddNormals

The function MRY_WIREFRAME_BUILDING.fnAddNormals is a member function of the MRY_WIREFRAME_BUILDING struct that adds one or more normals to the wireframe.

    long WINAPI fnAddNormals(long hWireframeID, long nNumNormals, MRY_VECTOR *pvNormals);

Parameters

hWireframeID

contains Morays handle of the wireframe being built.

nNumNormals

the number of normals that are to be added to the normals list.

pvNormals

A pointer to an array of MRY_VECTORs that contain the normals.

Return Values

MRY_SUCCESS

if the normals were appended to the list.

MRY_ERR_NULL_POINTER

if hWireframeID was NULL.

MRY_ERR_INTERNAL_ERROR

if something went very wrong.

MRY_ERR_WIRE_TOO_MANY_NORMALS

if more normals were passed in than were specified in the call to fnAllocateMemory.

Remarks

The normals are appended to the end of the normals list. It is up to the plugin to keep track of the indeces where normals are being added (if the plugin needs to).

The normals are copied from pvNormals, no memory is grabbed from the plugin. They are not shuffled about, so they stay in the same order in which the plugin passes them in.


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnAddNormal

The function MRY_WIREFRAME_BUILDING.fnAddNormal is a member function of the MRY_WIREFRAME_BUILDING struct that adds a normal to the wireframe.

    long WINAPI fnAddNormal(long hWireframeID, double dNX, double dNY, double dNZ);

Parameters

hWireframeID

contains Morays handle of the wireframe being built.

dNX, dNY, dNZ

The coordinates of the normal to be added.

Return Values

MRY_SUCCESS

if the normal was appended to the list.

MRY_ERR_NULL_POINTER

if hWireframeID was NULL.

MRY_ERR_INTERNAL_ERROR

if something went very wrong.

MRY_ERR_WIRE_TOO_MANY_NORMALS

if more normals were passed in than were specified in the call to fnAllocateMemory.

Remarks

The normal is appended to the end of the normals list. It is up to the plugin to keep track of the indeces where normals are being added (if the plugin needs to).

The normals are not shuffled about, so they stay in the same order in which the plugin passes them in.


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnAddUVCoords

The function MRY_WIREFRAME_BUILDING.fnAddUVCoords is a member function of the MRY_WIREFRAME_BUILDING struct that adds one or more UV coordinates to the wireframe.

    long WINAPI fnAddUVCoords)(long hWireframeID, long nNumUVCoords, MRY_VECTOR *pvUVCoords);

Parameters

hWireframeID

contains Morays handle of the wireframe being built.

nNumUVCoords

the number of UV coordinates that are to be added to the UV coordinates list.

pvUVCoords

A pointer to an array of MRY_VECTORs that contain the UV coordinates.

Return Values

MRY_SUCCESS

if the UV coordinates were appended to the list.

MRY_ERR_NULL_POINTER

if hWireframeID was NULL.

MRY_ERR_INTERNAL_ERROR

if something went very wrong.

MRY_ERR_WIRE_TOO_MANY_UVCOORDS

if more UV coordinates were passed in than were specified in the call to fnAllocateMemory.

Remarks

The UV coordinates are appended to the end of the UV coordinates list. It is up to the plugin to keep track of the indeces where UV coordinates are being added (if the plugin needs to).

The UV coordinates are copied from pvUVCoords, no memory is grabbed from the plugin. They are not shuffled about, so they stay in the same order in which the plugin passes them in.


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnAddUVCoord

The function MRY_WIREFRAME_BUILDING.fnAddUVCoord is a member function of the MRY_WIREFRAME_BUILDING struct that adds a UV coordinate to the wireframe.

    long WINAPI fnAddUVCoord(long hWireframeID, double dUVX, double dUVY, double dUVZ);

Parameters

hWireframeID

contains Morays handle of the wireframe being built.

dUVX, dUVY, dUVZ

The coordinates of the UV coordinate to be added.

Return Values

MRY_SUCCESS

if the UV coordinate was appended to the list.

MRY_ERR_NULL_POINTER

if hWireframeID was NULL.

MRY_ERR_INTERNAL_ERROR

if something went very wrong.

MRY_ERR_WIRE_TOO_MANY_NORMALS

if more UV coordinates were added than were specified in the call to fnAllocateMemory.

Remarks

The UV coordinate is appended to the end of the UV coordinates list. It is up to the plugin to keep track of the indeces where UV coordinate are being added (if the plugin needs to).

The UV coordinates are not shuffled about, so they stay in the same order in which the plugin passes them in.


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnAddEdges

The function MRY_WIREFRAME_BUILDING.fnAddEdges is a member function of the MRY_WIREFRAME_BUILDING struct that adds one or more edges to the wireframe.

    long WINAPI fnAddEdges(long hWireframeID, long nNumEdges, int *pnEdges);

Parameters

hWireframeID

contains Morays handle of the wireframe being built.

nNumEdges

the number of edges that are to be added to the edge list.

pnEdges

A pointer to an array of pairs of ints that contain start and end index of the vertices that define the edges.

Return Values

MRY_SUCCESS

if the edges were appended to the list.

MRY_ERR_NULL_POINTER

if hWireframeID was NULL.

MRY_ERR_INTERNAL_ERROR

if something went very wrong.

MRY_ERR_WIRE_TOO_MANY_UVCOORDS

if more edges were passed in than were specified in the call to fnAllocateMemory.

Remarks

The edges are appended to the end of the edge list. pnEdges must point to an array of int pairs, the first int defining the index of the vertex that defines the start of the edge. The second in defines the index of the vertex that defines the end of the edge.

The edges are copied from pnEdges, no memory is grabbed from the plugin. They are not shuffled about, so they stay in the same order in which the plugin passes them in.


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnAddEdge

The function MRY_WIREFRAME_BUILDING.fnAddEdge is a member function of the MRY_WIREFRAME_BUILDING struct that adds one or more edges to the wireframe.

    long WINAPI fnAddEdge(long hWireframeID, int nVertex1, int nVertex2);

Parameters

hWireframeID

contains Morays handle of the wireframe being built.

nVertex1, nVertex2

the indeces of the vertices that make up the edge to be added to the edge list.

Return Values

MRY_SUCCESS

if the edge was appended to the list.

MRY_ERR_NULL_POINTER

if hWireframeID was NULL.

MRY_ERR_INTERNAL_ERROR

if something went very wrong.

MRY_ERR_WIRE_TOO_MANY_UVCOORDS

if more edges were passed in than were specified in the call to fnAllocateMemory.

Remarks

The edge is appended to the end of the edge list.

The edges are not shuffled about, so they stay in the same order in which the plugin passes them in.


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnAddTriangle

The function MRY_WIREFRAME_BUILDING.fnAddTriangle is a member function of the MRY_WIREFRAME_BUILDING struct that adds one triangle to the wireframe.

    long WINAPI fnAddTriangle)(long hWireframeID, int nVertIndex1, int nVertIndex2, int nVertIndex3, long *hTriangleID);

Parameters

hWireframeID

contains Morays handle of the wireframe being built.

nVertIndex1

contains the index into the vertex list that defines the first vertex of the triangle.

nVertIndex2

contains the index into the vertex list that defines the second vertex of the triangle.

nVertIndex3

contains the index into the vertex list that defines the third vertex of the triangle.

hTriangleID

A pointer to a long that will receive the handle of the created triangle.

Return Values

MRY_SUCCESS

if the triangle was appended to the list.

MRY_ERR_NULL_POINTER

if hWireframeID was NULL.

MRY_ERR_INTERNAL_ERROR

if something went very wrong.

MRY_ERR_OUT_OF_MEMORY

if memory for triangles could not be allocated (will not occur if fnAllocateMemory was called)..

Remarks

NEW!Note: You can use the fnAddFace function instead.

Moray will create a triangle using the indeces passed and will return a handle to that triangle in hTriangleID. The plugin should then use the functions fnSetTriangleNormal and fnSetTriangleUVCoords to set the normals and the UV coordinates of the triangle.


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnAddQuad

The function MRY_WIREFRAME_BUILDING.fnAddQuad is a member function of the MRY_WIREFRAME_BUILDING struct that adds one quad to the wireframe.

    long WINAPI fnAddQuad(long hWireframeID, int nVertIndex1, int nVertIndex2, int nVertIndex3, int nVertIndex4, long *hQuadID);

Parameters

hWireframeID

contains Morays handle of the wireframe being built.

nVertIndex1

contains the zero-based index into the vertex list that defines the first vertex of the quad.

nVertIndex2

contains the zero-based index into the vertex list that defines the second vertex of the quad.

nVertIndex3

contains the zero-based index into the vertex list that defines the third vertex of the quad.

nVertIndex4

contains the zero-based index into the vertex list that defines the fourth vertex of the quad.

hQuadID

A pointer to a long that will receive a handle to the created quad.

Return Values

MRY_SUCCESS

if the quad was appended to the list.

MRY_ERR_NULL_POINTER

if hObj was NULL.

MRY_ERR_INTERNAL_ERROR

if something went very wrong.

MRY_ERR_OUT_OF_MEMORY

if memory for quads could not be allocated (will not occur if fnAllocateMemory was called).

Remarks

NEW!Note: You can use the fnAddFace function instead.

Moray will create a quad using the indeces passed and will return a handle to that quad in hQuadID. The plugin should then use the functions fnSetQuadNormal and fnSetQuadUVCoords to set the normals and the UV coordinates of the quad.


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnSetTriangleNormals

The function MRY_WIREFRAME_BUILDING.fnSetTriangleNormals is a member function of the MRY_WIREFRAME_BUILDING struct that sets the normals of a triangle that was added to the wireframe.

    long WINAPI fnSetTriangleNormals(long hTriangleID, int nNormIndex1, int nNormIndex2, int nNormIndex3);

Parameters

hTriangleID

contains the handle to a triangle returned by the fnAddTriangle function.

nNormIndex1

contains the zero-based index into the normal list that defines the normal at the first vertex of the triangle.

nNormIndex2

contains the zero-based index into the normal list that defines the normal at the second vertex of the triangle.

nNormIndex3

contains the zero-based index into the normal list that defines the normal at the third vertex of the triangle.

Return Values

MRY_SUCCESS

if the normals were set.

MRY_ERR_NULL_POINTER

if hTriangleID is NULL.

Remarks

The indeces are not checked. Therefore the indeces of the normals can be passed to this triangle before they are created with the fnAddNormals function. Of course, the plugin does need to make sure that when the wireframe is done, all indeces are valid.


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnSetQuadNormals

The function MRY_WIREFRAME_BUILDING.fnSetQuadNormals is a member function of the MRY_WIREFRAME_BUILDING struct that sets the normals of a quad that was added to the wireframe.

    long WINAPI fnSetQuadNormals(long hQuadID, int nNormIndex1, int nNormIndex2, int nNormIndex3, int nNormIndex4);

Parameters

hQuadID

contains the handle to a quad returned by the fnAddQuad function.

nNormIndex1

contains the zero-based index into the normal list that defines the normal at the first vertex of the quad.

nNormIndex2

contains the zero-based index into the normal list that defines the normal at the second vertex of the quad.

nNormIndex3

contains the zero-based index into the normal list that defines the normal at the third vertex of the quad.

nNormIndex4

contains the zero-based index into the normal list that defines the normal at the fourth vertex of the quad.

Return Values

MRY_SUCCESS

if the normals were set.

MRY_ERR_NULL_POINTER

if hQuadID is NULL.

Remarks

The indeces are not checked. Therefore the indeces of the normals can be passed to this quad before they are created with the fnAddNormals function. Of course, the plugin does need to make sure that when the wireframe is done, all indeces are valid.


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnSetTriangleUVCoords

The function MRY_WIREFRAME_BUILDING.fnSetTriangleUVCoords is a member function of the MRY_WIREFRAME_BUILDING struct that sets the UV coordinates of the vertices of a triangle that was added to the wireframe.

    long WINAPI fnSetTriangleUVCoords(long hTriangleID, int nUVIndex1, int nUVIndex2, int nUVIndex3);

Parameters

hTriangleID

contains the handle to a triangle returned by the fnAddTriangle function.

nNormIndex1

contains the zero-based index into the UV coordinates list that defines the UV coordinate at the first vertex of the triangle.

nNormIndex2

contains the zero-based index into the UV coordinates list that defines the UV coordinate at the second vertex of the triangle.

nNormIndex3

contains the zero-based index into the UV coordinates list that defines the UV coordinate at the third vertex of the triangle.

Return Values

MRY_SUCCESS

if the UV coordinates were set.

MRY_ERR_NULL_POINTER

if hTriangleID is NULL.

Remarks

The indeces are not checked. Therefore the indeces of the UV coordinates can be passed to this triangle before they are created with the fnAddUVCoords function. Of course, the plugin does need to make sure that when the wireframe is done, all indeces are valid.


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnSetQuadUVCoords

The function MRY_WIREFRAME_BUILDING.fnSetQuadUVCoords is a member function of the MRY_WIREFRAME_BUILDING struct that sets the UV coordinates of the vertices of a quad that was added to the wireframe.

    long WINAPI fnSetQuadUVCoords(long hQuadID, int nUVIndex1, int nUVIndex2, int nUVIndex3, int nUVIndex4);

Parameters

hQuadID

contains the handle to a quad returned by the fnAddQuad function.

nUVIndex1

contains the zero-based index into the UV coordinates list that defines the UV coordinate at the first vertex of the quad.

nUVIndex2

contains the zero-based index into the UV coordinates list that defines the UV coordinate at the second vertex of the quad.

nUVIndex3

contains the zero-based index into the UV coordinates list that defines the UV coordinate at the third vertex of the quad.

nUVIndex4

contains the zero-based index into the UV coordinates list that defines the UV coordinate at the fourth vertex of the quad.

Return Values

MRY_SUCCESS

if the UV coordinates were set.

MRY_ERR_NULL_POINTER

if hQuadID is NULL.

Remarks

The indeces are not checked. Therefore the indeces of the UV coordinates can be passed to this quad before they are created with the fnAddUVCoords function. Of course, the plugin does need to make sure that when the wireframe is done, all indeces are valid.


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnSetTriangleMaterial

The function MRY_WIREFRAME_BUILDING.fnSetTriangleMaterial is a member function of the MRY_WIREFRAME_BUILDING struct that sets the material of a triangle of a wireframe.

    long WINAPI fnSetTriangleMaterial(long hPoly, int nMaterialIndex);

Parameters

hPoly

contains the handle of the triangle returned in the last parameter in the call to the fnAddTriangle function.

nMaterialIndex

contains the index of the material to be used for this triangle. The materials are defined by calling functions in the mesh part of the MRY_OBJ_SPECIFIC struct (retrieved by GetAttributes).

Return Values

MRY_SUCCESS

always.

Remarks

The index is not checked. It is up the plugin to make sure that the mesh object has the correct list of materials.

See Also

MRY_OBJ_SPECIFIC


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnSetQuadMaterial

The function MRY_WIREFRAME_BUILDING.fnSetQuadMaterial is a member function of the MRY_WIREFRAME_BUILDING struct that sets the material of a quad of a wireframe.

    long WINAPI fnSetQuadMaterial(long hPoly, int nMaterialIndex);

Parameters

hPoly

contains the handle of the quad returned in the last parameter in the call to the fnAddQuad function.

nMaterialIndex

contains the index of the material to be used for this quad. The materials are defined by calling functions in the mesh part of the MRY_OBJ_SPECIFIC struct (retrieved by GetAttributes).

Return Values

MRY_SUCCESS

always.

Remarks

The index is not checked. It is up the plugin to make sure that the mesh object has the correct list of materials.

See Also

MRY_OBJ_SPECIFIC


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnAddMeshTriangle

The function MRY_WIREFRAME_BUILDING.fnAddMeshTriangle is a member function of the MRY_WIREFRAME_BUILDING struct that adds a complete triangle to the wireframe of a plugin object.

    long WINAPI fnAddMeshTriangle(long hObj, LPMRY_OBJ_TRIANGLE_EXT pTri);

Parameters

hObj

contains Morays handle of the plugin object being built.

pTri

contains a pointer to a MRY_OBJ_TRIANGLE_EXT struct containing the triangle definition.

Return Values

MRY_SUCCESS

if the triangle was added.

MRY_ERR_VERSION_NOT_SUPPORTED

if the nVersion member is incompatible with Moray.

Remarks

This function is the second way (as described under MRY_WIREFRAME_BUILDING) of building a wireframe for a plugin object. Moray extracts all the data from the struct and creates the corresponding lists.

NEW!Note: this member of the MRY_WIREFRAME_BUILDING struct is only valid if the object being built is a plugin object!

See MRY_OBJ_TRIANGLE_EXT for more details.

See Also

MRY_OBJ_TRIANGLE_EXT, MRY_WIREFRAME_BUILDING, AddMeshQuad


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnAddMeshQuad

The function MRY_WIREFRAME_BUILDING.fnAddMeshQuad is a member function of the MRY_WIREFRAME_BUILDING struct that adds a complete quad to the wireframe of a plugin object.

    long WINAPI fnAddMeshQuad(long hObj, LPMRY_OBJ_QUAD_EXT pQuad);

Parameters

hObj

contains Morays handle of the plugin object being built.

pTri

contains a pointer to a MRY_OBJ_QUAD_EXT struct containing the quad definition.

Return Values

MRY_SUCCESS

if the quad was added.

MRY_ERR_VERSION_NOT_SUPPORTED

if the nVersion member is incompatible with Moray.

Remarks

This function is the second way (as described under MRY_WIREFRAME_BUILDING) of building a wireframe for a plugin object. Moray extracts all the data from the struct and creates the corresponding lists.

NEW!Note: this member of the MRY_WIREFRAME_BUILDING struct is only valid if the object being built is a plugin object!

See MRY_OBJ_QUAD_EXT for more details.

See Also

MRY_OBJ_QUAD_EXT, MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnGetVertex

The function MRY_WIREFRAME_BUILDING.fnGetVertex is a member function of the MRY_WIREFRAME_BUILDING struct and fills a MRY_VECTOR struct with the coordinates of a vertex.

    long WINAPI fnGetVertex(long hWireframe, int nIndex, LPMRY_VECTOR v);

Parameters

hWireframe

contains the handle of the wireframe that is being queried.

nIndex

contains the zero-based index of the vertex to retrieve.

v

contains a pointer to the vector that should receive the coordinates of the vector.

Return Values

MRY_SUCCESS

if the structure was successfully filled.

MRY_ERR_NULL_POINTER

if hWireframe is NULL.

MRY_ERR_INDEX_OUT_OF_RANGE

if nIndex is out of range (less than zero or larger than the number of vertices present).

MRY_ERR_WIRE_NO_VERTICES

if the wireframe does not have any vertices.

Remarks

Valid indeces go up to, but excluding the value that was returned in the nNumVertices parameter of the the call to fnGetWireInfo member of the MRY_WIREFRAME_BUILDING struct.

See Also

MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnGetNormal

The function MRY_WIREFRAME_BUILDING.fnGetNormal is a member function of the MRY_WIREFRAME_BUILDING struct and fills a MRY_VECTOR struct with the coordinates of a normal.

    long WINAPI fnGetNormal(long hWireframe, int nIndex, LPMRY_VECTOR n);

Parameters

hWireframe

contains the handle of the wireframe that is being queried.

nIndex

contains the zero-based index of the normal to retrieve.

n

contains a pointer to the vector that should receive the coordinates of the normal.

Return Values

MRY_SUCCESS

if the structure was successfully filled.

MRY_ERR_NULL_POINTER

if hWireframe is NULL.

MRY_ERR_INDEX_OUT_OF_RANGE

if nIndex is out of range (less than zero or larger than the number of normals present).

MRY_ERR_WIRE_NO_NORMALS

if the wireframe does not have any normals.

Remarks

Valid indeces go up to, but excluding the value that was returned in the pnNumNormals parameter of the the call to fnGetWireInfo member of the MRY_WIREFRAME_BUILDING struct.

See Also

MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnGetUVCoord

The function MRY_WIREFRAME_BUILDING.fnGetUVCoord is a member function of the MRY_WIREFRAME_BUILDING struct and fills a MRY_VECTOR struct with the U and V values of a UV coordinate.

    long WINAPI fnGetUVCoord(long hWireframe, int nIndex, LPMRY_VECTOR uv);

Parameters

hWireframe

contains the handle of the wireframe that is being queried.

nIndex

contains the zero-based index of the UV Coordinate to retrieve.

uv

contains a pointer to the vector that should receive the values of the UV coordinate.

Return Values

MRY_SUCCESS

if the structure was successfully filled.

MRY_ERR_NULL_POINTER

if hWireframe is NULL.

MRY_ERR_INDEX_OUT_OF_RANGE

if nIndex is out of range (less than zero or larger than the number of UV coordinates present).

MRY_ERR_WIRE_NO_UVCOORDS

if the wireframe does not have any UV coordinates.

Remarks

Valid indeces go up to, but excluding the value that was returned in the pnNumUVCoords parameter of the the call to fnGetWireInfo member of the MRY_WIREFRAME_BUILDING struct.

See Also

MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnGetEdge

The function MRY_WIREFRAME_BUILDING.fnGetEdge is a member function of the MRY_WIREFRAME_BUILDING struct and fills a MRY_VECTOR struct with the coordinates of a vertex.

    long WINAPI fnGetEdge(long hWireframe, int nIndex, long* plVert1, long* plVert2);

Parameters

hWireframe

contains the handle of the wireframe that is being queried.

nIndex

contains the zero-based index of the edge to retrieve.

plVert1, plVert2

contain pointers to the long that should receive the indeces of the vertices that make up the edge.

Return Values

MRY_SUCCESS

if the structure was successfully filled.

MRY_ERR_NULL_POINTER

if hWireframe is NULL.

MRY_ERR_INDEX_OUT_OF_RANGE

if nIndex is out of range (less than zero or larger than the number of edges present).

MRY_ERR_WIRE_NO_EDGES

if the wireframe does not have any edges.

Remarks

Valid indeces go up to, but excluding the value that was returned in the pnNumEdges parameter of the the call to fnGetWireInfo member of the MRY_WIREFRAME_BUILDING struct.

See Also

MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnGetTriangle

The function MRY_WIREFRAME_BUILDING.fnGetTriangle is a member function of the MRY_WIREFRAME_BUILDING struct and fills a MRY_MESH_TRIANGLE_EXT struct with the data of a triangle.

    long WINAPI fnGetTriangle(long hWireframe, int nIndex, LPMRY_MSH_TRIANGLE_EXT pTri);

Parameters

hWireframe

contains the handle of the wireframe that is being queried.

nIndex

contains the zero-based index of the vertex to retrieve.

pTri

contains a pointer to MRY_MESH_TRIANGLE_EXT struct that should receive the triangle data.

Return Values

MRY_SUCCESS

if the structure was successfully filled.

MRY_ERR_NULL_POINTER

if hWireframe is NULL.

MRY_ERR_INDEX_OUT_OF_RANGE

if nIndex is out of range (less than zero or larger than the number of triangles present).

MRY_ERR_WIRE_NO_TRIANGLES

if the wireframe does not have any triangles.

Remarks

NEW!Note: Please use the fnGetFace function instead.

Valid indeces go up to, but excluding the value that was returned in the pnNumTriangles parameter of the the call to fnGetWireInfo member of the MRY_WIREFRAME_BUILDING struct.

See Also

MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnGetQuad

The function MRY_WIREFRAME_BUILDING.fnGetQuad is a member function of the MRY_WIREFRAME_BUILDING struct and fills a MRY_MESH_QUAD_EXT struct with the data of a quad.

    long WINAPI fnGetQuad(long hWireframe, int nIndex, LPMRY_MSH_QUAD_EXT pQuad);

Parameters

hWireframe

contains the handle of the wireframe that is being queried.

nIndex

contains the zero-based index of the quad to retrieve.

pTri

contains a pointer to MRY_MESH_QUAD_EXT struct that should receive the quad data.

Return Values

MRY_SUCCESS

if the structure was successfully filled.

MRY_ERR_NULL_POINTER

if hWireframe is NULL.

MRY_ERR_INDEX_OUT_OF_RANGE

if nIndex is out of range (less than zero or larger than the number of quads present).

MRY_ERR_WIRE_NO_QUADS

if the wireframe does not have any quads.

Remarks

NEW!Note: Please use the fnGetFace function instead.

Valid indeces go up to, but excluding the value that was returned in the pnNumQuads parameter of the the call to fnGetWireInfo member of the MRY_WIREFRAME_BUILDING struct.

See Also

MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnModifyVertex

The function MRY_WIREFRAME_BUILDING.fnModifyVertex is a member function of the MRY_WIREFRAME_BUILDING struct and modifies the coordinates of a vertex.

    long WINAPI fnModifyVertex(long hWireframeID, int nIndex, double dX, double dY, double dZ);

Parameters

hWireframeID

contains the handle of the wireframe that is being modified

nIndex

contains the zero-based index of the vertex to modify.

dX, dY, dZ

contains the coordinates that the vertex should be set to.

Return Values

MRY_SUCCESS

if the structure was successfully filled.

MRY_ERR_NULL_POINTER

if hWireframeID is NULL.

MRY_ERR_INDEX_OUT_OF_RANGE

if nIndex is out of range (less than zero or larger than the number of vertices present).

Remarks

Valid indeces go up to, but excluding the value that was returned in the pnNumVertices parameter of the the call to fnGetWireInfo member of the MRY_WIREFRAME_BUILDING struct.

See Also

MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnModifyNormal

The function MRY_WIREFRAME_BUILDING.fnModifyNormal is a member function of the MRY_WIREFRAME_BUILDING struct and modifies the coordinates of a normal.

    long WINAPI fnModifyNormal(long hWireframeID, int nIndex, double dNX, double dNY, double dNZ);

Parameters

hWireframeID

contains the handle of the wireframe that is being modified

nIndex

contains the zero-based index of the normal to modify.

dNX, dNY, dNZ

contains the coordinates that the normal should be set to.

Return Values

MRY_SUCCESS

if the structure was successfully filled.

MRY_ERR_NULL_POINTER

if hWireframeID is NULL.

MRY_ERR_INDEX_OUT_OF_RANGE

if nIndex is out of range (less than zero or larger than the number of normal present).

Remarks

Valid indeces go up to, but excluding the value that was returned in the pnNumNormals parameter of the the call to fnGetWireInfo member of the MRY_WIREFRAME_BUILDING struct.

See Also

MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnModifyUVCoord

The function MRY_WIREFRAME_BUILDING.fnModifyUVCoord is a member function of the MRY_WIREFRAME_BUILDING struct and modifies the values of a UV coordinates.

    long WINAPI fnModifyUVCoord(long hWireframeID, int nIndex, double dUVX, double dUVY, double dUVZ);

Parameters

hWireframeID

contains the handle of the wireframe that is being modified

nIndex

contains the zero-based index of the UV coordinate to modify.

dX, dY, dZ

contains the values that the UV coordinate should be set to.

Return Values

MRY_SUCCESS

if the structure was successfully filled.

MRY_ERR_NULL_POINTER

if hWireframeID is NULL.

MRY_ERR_INDEX_OUT_OF_RANGE

if nIndex is out of range (less than zero or larger than the number of UV coordinate present).

Remarks

Valid indeces go up to, but excluding the value that was returned in the pnNumUVCoords parameter of the the call to fnGetWireInfo member of the MRY_WIREFRAME_BUILDING struct.

See Also

MRY_WIREFRAME_BUILDING,


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnModifyEdge

The function MRY_WIREFRAME_BUILDING.fnModifyEdge is a member function of the MRY_WIREFRAME_BUILDING struct and modifies an edge.

    long WINAPI fnModifyEdge(long hWireframeID, int nIndex, long lNewStart, long lNewEnd);

Parameters

hWireframeID

contains the handle of the wireframe that is being modified

nIndex

contains the zero-based index of the edge to modify.

lNewStart, lNewEnd

contains the indeces of the vertices that define the edge.

Return Values

MRY_SUCCESS

if the structure was successfully filled.

MRY_ERR_NULL_POINTER

if hWireframeID is NULL.

MRY_ERR_INDEX_OUT_OF_RANGE

if nIndex is out of range (less than zero or larger than the number of edges present).

Remarks

Valid indeces go up to, but excluding the value that was returned in the pnNumEdges parameter of the the call to fnGetWireFaceInfo member of the MRY_WIREFRAME_BUILDING struct.

See Also

MRY_WIREFRAME_BUILDING,


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnModifyTriangle

The function MRY_WIREFRAME_BUILDING.fnModifyTriangle is a member function of the MRY_WIREFRAME_BUILDING struct and modifies a triangle.

    long WINAPI fnModifyTriangle(long hWireframeID, int nIndex, LPMRY_MSH_TRIANGLE_EXT pTri);

Parameters

hWireframeID

contains the handle of the wireframe that is being modified

nIndex

contains the zero-based index of the triangle to modify.

pTri

contains a pointer to a MRY_MSH_TRIANGLE_EXT struct that contains the new triangle definition.

Return Values

MRY_SUCCESS

if the structure was successfully filled.

MRY_ERR_NULL_POINTER

if hWireframeID is NULL.

MRY_ERR_INDEX_OUT_OF_RANGE

if nIndex is out of range (less than zero or larger than the number of vertices present).

MRY_ERR_WIRE_NO_TRIANGLES

if the wireframe does not have any triangles.

Remarks

NEW!Note: Please use the fnModifyFace function instead.

Valid indeces go up to, but excluding the value that was returned in the pnNumTriangles parameter of the the call to fnGetWireInfo member of the MRY_WIREFRAME_BUILDING struct.

See Also

MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnModifyQuad

The function MRY_WIREFRAME_BUILDING.fnModifyQuad is a member function of the MRY_WIREFRAME_BUILDING struct and modifies a quad.

    long WINAPI fnModifyQuad(long hWireframeID, int nIndex, LPMRY_MSH_QUAD_EXT pQuad);

Parameters

hWireframeID

contains the handle of the wireframe that is being modified

nIndex

contains the zero-based index of the quad to modify.

pQuad

contains a pointer to a MRY_MSH_QUAD_EXT struct that contains the new quad definition.

Return Values

MRY_SUCCESS

if the structure was successfully filled.

MRY_ERR_NULL_POINTER

if hWireframeID is NULL.

MRY_ERR_INDEX_OUT_OF_RANGE

if nIndex is out of range (less than zero or larger than the number of vertices present).

MRY_ERR_WIRE_NO_QUADS

if the wireframe does not have any quads.

Remarks

NEW!Note: Please use the fnModifyFace function instead.

Valid indeces go up to, but excluding the value that was returned in the pnNumQuads parameter of the the call to fnGetWireInfo member of the MRY_WIREFRAME_BUILDING struct.

See Also

MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnGetWireFaceInfo

The function MRY_WIREFRAME_BUILDING.fnGetWireFaceInfo is a member function of the MRY_WIREFRAME_BUILDING struct and retrieves info about the wireframe.

    long WINAPI fnGetWireFaceInfo(long hWireFrameID, long *pnNumVertices, long *pnNumNormals, long *pnNumEdges, long *pnNumUVCoords, long *pnNumFaces);

Parameters

hWireframeID

contains the handle of the wireframe that is being modified

pnNumVertices

contains a pointer to where the number of vertices should be written

pnNumNormals

contains a pointer to where the number of normals should be written

pnNumEdges

contains a pointer to where the number of edges should be written

pnNumUVCoords

contains a pointer to where the number of UV coordinates should be written

pnNumFaces

contains a pointer to where the number of faces should be written

Return Values

MRY_SUCCESS

if the structure was successfully filled.

MRY_ERR_NULL_POINTER

if hWireFrameID is NULL.

Remarks

If any of the pointers are NULL, the information will not be written.

See Also

MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnGetFace

The function MRY_WIREFRAME_BUILDING.fnGetFace is a member function of the MRY_WIREFRAME_BUILDING struct and retrieves the information associated with a face.

    long WINAPI fnGetFace(long hWireFrameID, int nIndex, LPMRY_MSH_FACE pMeshFace);

Parameters

hWireframeID

contains the handle of the wireframe that is being queried

nIndex

contains the zero-based index of the vertex to retrieve.

pMeshFace

contains a pointer to MRY_MSH_FACE struct that should receive the face data.

Return Values

MRY_SUCCESS

if the structure was successfully filled.

MRY_ERR_NULL_POINTER

if hWireframe or pMeshFace is NULL.

MRY_ERR_WIRE_NO_FACES

if the wireframe has no faces.

MRY_ERR_INDEX_OUT_OF_RANGE

if nIndex is out of range (less than zero or larger or equal to the number of faces present).


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnAddFace

The function MRY_WIREFRAME_BUILDING.fnAddFace is a member function of the MRY_WIREFRAME_BUILDING struct that adds one face to the wireframe.

    long WINAPI fnAddFace(long hWireFrameID, LPMRY_MSH_FACE pMeshFace, long *hFaceID);

Parameters

hWireframeID

contains Morays handle of the wireframe being built.

pMeshFace

contains a pointer to MRY_MSH_FACE struct that should contains the data of the new face.

hFaceID

A pointer to a long that will receive a handle to the created face (see Remarks).

Return Values

MRY_SUCCESS

if the face was appended to the list.

MRY_ERR_NULL_POINTER

if hWireframeID was NULL.

MRY_ERR_OUT_OF_MEMORY

if memory for faces could not be allocated (will not occur if fnAllocateMemory was called).

Remarks

Moray will create a face using data in the MRY_MSH_FACE struct. If hFaceID is not NULL, Moray will return a handle to that face in that variable. (The index of the new face is the number of faces before the call.)

To create a triangle instead of a quad, simply pass -1 as the fourth index. Note that the plugin can still use the functions fnSetQuadNormals (or fnSetTriangleNormals) and fnSetQuadUVCoords (or fnSetTriangleUVCoords) to set the normals and the UV coordinates of the face after creating a face like this. However, this call can be used to set everything at once. The vertices, normals and UV coordinates do not need to exist when you call this function (they do need to be created before the first attempt to draw the object!).

See Also

MRY_WIREFRAME_BUILDING, MRY_MSH_FACE


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnModifyFace

The function MRY_WIREFRAME_BUILDING.fnModifyFace is a member function of the MRY_WIREFRAME_BUILDING struct and modifies a face.

    long WINAPI fnModifyFace(long hWireFrameID, int nIndex, LPMRY_MSH_FACE pMeshFace);

Parameters

hWireframeID

contains the handle of the wireframe that is being modified

nIndex

contains the zero-based index of the face to modify.

pMeshFace

contains a pointer to MRY_MSH_FACE struct that contains the new face data.

Return Values

MRY_SUCCESS

if the structure was successfully transferred.

MRY_ERR_NULL_POINTER

if either hWireFrameID or pMeshFace are NULL.

MRY_ERR_WIRE_NO_FACES

if no faces are present in the wireframe (see Remarks).

MRY_ERR_INDEX_OUT_OF_RANGE

if nIndex is out of range (less than zero or larger or equal to the number of faces present).

MRY_ERR_WIRE_ONLY_TRIS_AND_QUADS

if the nNumVertices member of the MRY_MSH_FACE struct is not 3 or 4.

See Also

MRY_WIREFRAME_BUILDING, MRY_MSH_FACE


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnGenerateNormals

The function MRY_WIREFRAME_BUILDING.fnGenerateNormals is a member function of the MRY_WIREFRAME_BUILDING struct and generates normals.

    long WINAPI fnGenerateNormals(long hWireFrameID, double dThreshold);

Parameters

hWireframeID

contains the handle of the wireframe whose normals should be generated.

dThreshold

is a reserved variable. Pass 0.0.

Return Values

MRY_SUCCESS

if the normals were generated.

MRY_ERR_NULL_POINTER

if hWireFrameID is NULL.

Remarks

This function generates normals for the mesh such that each face is flat-shaded. Currently existing normals are disarded.

Later Moray versions may use the dThreshold value to do automatic smoothing.

See Also

MRY_WIREFRAME_BUILDING


Top
 

NEW!MRY_WIREFRAME_BUILDING.fnGenerateEdges

The function MRY_WIREFRAME_BUILDING.fnGenerateEdges is a member function of the MRY_WIREFRAME_BUILDING struct and generates edges.

    long WINAPI fnGenerateEdges(long hWireFrameID);

Parameters

hWireframeID

contains the handle of the wireframe whose edges should be generated.

Return Values

MRY_SUCCESS

if the edges were generated.

MRY_ERR_NULL_POINTER

if hWireFrameID is NULL.

Remarks

This function generates edges for the mesh. If you do not have an optimized edge representation, this function can create an edge structure that contains each edge only once (even though it may be shared by two faces).

See Also

MRY_WIREFRAME_BUILDING


Top
 

MRY_TEXTURE_DATA


   struct MRY_TEXTURE_DATA;

The struct MRY_TEXTURE_DATA is used by the Scene Interface GetAttributes function to retrieve texture-specific information about a texture. A pointer to this structure is used in the MRY_OBJ_ATTRIBUTES structure.

The MRY_TEXTURE_DATA struct has the following members:



The rest is a union of structs that hold information according to the nType member.

See Also

MRY_OBJ_ATTRIBUTES, SetAttributes, GetAttributes


Top
 

MRY_TEX_COLORMAP_ENTRY


   struct MRY_TEX_COLORMAP_ENTRY;

The struct MRY_TEX_COLORMAP_ENTRY is used by the Scene Interface GetAttributes function to retrieve colormap information from a texture node.

The MRY_TEX_COLORMAP_ENTRY struct has the following members:


Top
 

MRY_TEX_CREATE_PARAMS


   struct MRY_TEX_CREATE_PARAMS;

The struct MRY_TEX_CREATE_PARAMS is used by the Scene Interface CreateObject function to inform Moray what type of texture node to create.

The MRY_TEX_CREATE_PARAMS struct has the following members:


The types in the nType parameters correspond exactly to the nodes in the Texture Editor. It is recommended that you become familiar with the nodes and their relationships (which nodes can be added to which nodes how many times) before you attempt to create textures from a plugin.

You do not need to name any of the texture nodes except material. Material nodes MUST be named.

Halos are no longer supported and cannot be created from a plugin.

See Also

CreateObject


Top
 

MRY_CONTROL_INFO


   struct MRY_CONTROL_INFO;

The struct MRY_CONTROL_INFO is used by the Object Interface GetControlInfo function to retrieve information about a control associated with a plugin object.

The MRY_CONTROL_INFO struct has the following members:

See Also

GetControlInfo, MRY_MENU_COMMAND


Top
 

MRY_MENU_COMMAND


   struct MRY_MENU_COMMAND;

The struct MRY_MENU_COMMAND is used by the Menu Interface GetItemInfoEx function to allow the plugin to define a menu item with an optional hotkey, or to define a hotkey only.

The MRY_MENU_COMMAND struct has the following members:

See Also

GetItemInfo, GetItemInfoEx


Top
 

MRY_MNU_ITEMSTATE


   struct MRY_MNU_ITEMSTATE;

The struct MRY_MNU_ITEMSTATE is used by the Menu Interface GetItemState function to set the states of a menu item that is associated with the plugin.

The MRY_MNU_ITEMSTATE struct has the following members:

See Also

GetItemState


Top
 

MRY_VECTOR


   struct MRY_VECTOR;

The struct MRY_VECTOR is used when a three-dimensional vector is required.

The MRY_VECTOR struct has the following members:

See Also

MRY_BLOB_COMPONENT, MRY_MSH_TRIANGLE, MRY_BEZIER_CTRLPOINT, MRY_VERTEXEDGE, MRY_OBJ_SPECIFIC


Top
 

MRY_MSH_TRIANGLE


   struct MRY_MSH_TRIANGLE;

The struct MRY_MSH_TRIANGLE is used by the function returned in the fnGetTriangle pointer of the MRY_OBJ_ATTRIBUTES struct to retrieve and set triangles of a triangle mesh object.

The MRY_MSH_TRIANGLE struct has the following members:

See Also

MRY_OBJ_SPECIFIC, MRY_MSH_TRIANGLE_INDECES


Top
 

MRY_MSH_TRIANGLE_INDECES


   struct MRY_MSH_TRIANGLE_INDECES;

The struct MRY_MSH_TRIANGLE_INDECES is used by the function returned in the fnGetTriangleIndeces pointer of the MRY_OBJ_ATTRIBUTES struct to retrieve and set the indeces of the vertices of a triangle of a triangle mesh object.

The MRY_MSH_TRIANGLE_INDECES struct has the following members:

See Also

MRY_OBJ_SPECIFIC, MRY_MSH_TRIANGLE


Top
 

MRY_SWEEP_NODE


   struct MRY_SWEEP_NODE;

The struct MRY_SWEEP_NODE is used by the function returned in the fnGetSweepNode pointer of the MRY_OBJ_ATTRIBUTES struct to retrieve and set a node of a sweep.

The MRY_SWEEP_NODE struct has the following members:

See Also

MRY_OBJ_SPECIFIC


Top
 

MRY_BLOB_COMPONENT


   struct MRY_BLOB_COMPONENT;

The struct MRY_BLOB_COMPONENT is used by the function returned in the fnGetComponent pointer of the MRY_OBJ_ATTRIBUTES struct to retrieve and set the components of a blob.

The MRY_BLOB_COMPONENT struct has the following members:

See Also

MRY_OBJ_SPECIFIC


Top
 

MRY_BEZIER_CTRLPOINT


   struct MRY_BEZIER_CTRLPOINT;

The struct MRY_BEZIER_CTRLPOINT is used by the function returned in the fnGetCtrlPoint pointer of the MRY_OBJ_ATTRIBUTES struct to retrieve and set the control points of a bezier patch.

The MRY_BEZIER_CTRLPOINT struct has the following members:

See Also

MRY_BEZIER_PATCH, MRY_OBJ_SPECIFIC


Top
 

MRY_BEZIER_PATCH


   struct MRY_BEZIER_PATCH;

The struct MRY_BEZIER_PATCH is used by the function returned in the fnGetPatch pointer of the MRY_OBJ_ATTRIBUTES struct to retrieve and set individual patches of a bezier patch object.

The MRY_BEZIER_PATCH struct has the following members:

See Also

MRY_BEZIER_CTRLPOINT, MRY_OBJ_SPECIFIC


Top
 

MRY_VERTEXEDGE


   struct MRY_VERTEXEDGE;

The struct MRY_VERTEXEDGE is used by the fnAddVertexEdge function passed to the BuildLazyWireframe function to add a wireframe edge to a plugin object.

The MRY_VERTEXEDGE struct has the following members:

See Also

BuildLazyWireframe


Top
 

MRY_POINTS2D


   struct MRY_POINTS2D;

The struct MRY_POINTS2D is used as parameters by the functions fnGetScreenCoord, fnDrawPolyLine2D and fnSetMultiplePixels2D of the MRY_SCN_VIEWINFO structure to draw 2D pixels.

The MRY_POINTS2D struct has the following members:

See Also

MRY_SCN_VIEWINFO


Top
 

MRY_VIEW_BITMAP


   struct MRY_VIEW_BITMAP;

The struct MRY_VIEW_BITMAP is used as parameters by the function fnGetBitmapBits2D of the MRY_SCN_VIEWINFO structure to gain access to the pixels of the bitmap of the view.

The MRY_VIEW_BITMAP struct has the following members:



NEW! Not supported in Moray V3.5 and later.

You can use this function to gain low-level access to the pixels of a view. For higher-level access, please use one of the other functions available in MRY_SCN_VIEWINFO.
See the SAMPLE plugin for source code to use this function. It writes out a TGA image of the view.

See Also

MRY_SCN_VIEWINFO


Top
 

MRY_SCN_VIEWINFO


   struct MRY_SCN_VIEWINFO;

The struct MRY_SCN_VIEWINFO is used by the GetViewInfo function to return information about one of the four viewports.

The MRY_SCN_VIEWINFO struct has the following members:



There are two sets of functions:



Here is a summary of the bitmap functions contained in the MRY_SCN_VIEWINFO struct:
NEW! NOTE: the following functions are not available in Moray V3.5 and will return MRY_ERR_NOT_SUPPORTED if called. In earlier versions of Moray they are only available if the view is not in OpenGL mode.


Here is a summary of the other functions contained in the MRY_SCN_VIEWINFO struct:
NEW! NOTE: the following functions are still available in Moray V3.5.


fnWriteString is only available in V1.08 of the struct and later. fnSnapWorldCoord is only available in V1.09 of the struct and later.

See Also

GetViewInfo, RedrawScene, RedrawEvent


Top
 

MRY_SCN_VIEWINFO.fnDrawLine2D

The function MRY_SCN_VIEWINFO.fnDrawLine2D is a member function of the MRY_SCN_VIEWINFO struct and draws a line in a view with a certain color.

    long WINAPI fnDrawLine2D(long hView, int nX1, int nY1, int nX2, int nY2, long lColor);

Parameters

hView

contains the handle of the view in which to draw the line.

nX1, nX2, nY1, nY2

are the pixel coordinates of the line to draw.

lColor

contains the color of the pixel. Colors are in the form 0x00RRGGBB.

Return Values

MRY_ERR_NOT_SUPPORTED

is you are running under Moray V3.5 and later.

MRY_SUCCESS

if the line was drawn without being clipped.

MRY_ERR_CLIPPED

if the line was clipped.

MRY_ERR_INVALID_HANDLE

if hView is not a valid handle to a view.

MRY_ERR_NULL_POINTER

if hView is NULL.

MRY_ERR_INTERNAL_ERROR

if Moray is in an unstable state.

Remarks

The line is drawn in pixel coordinates. The line is clipped before being drawn (only the visible part of the line is drawn). Check the nWidth and nHeight members of the MRY_SCN_VIEWINFO structure to get the size of the view.

NEW! NOTE: this function will fail in Moray V3.5. In earlier versions it only works if the view is not in OpenGL mode.

See Also

MRY_SCN_VIEWINFO, GetViewInfo


Top
 

MRY_SCN_VIEWINFO.fnSetPixel2D

The function MRY_SCN_VIEWINFO.fnSetPixel2D is a member function of the MRY_SCN_VIEWINFO struct and sets a pixel in a view to a certain color.

    long WINAPI fnSetPixel2D(long hView, int nX, int nY, long lColor);

Parameters

hView

contains the handle of the view in which to set the pixel.

nX, nY

are the coordinates of the pixel to set.

lColor

contains the color of the pixel. Colors are in the form 0x00RRGGBB.

Return Values

MRY_ERR_NOT_SUPPORTED

is you are running under Moray V3.5 and later.

MRY_SUCCESS

if the pixel was successfully set.

MRY_ERR_CLIPPED

if the pixel was outside the views coordinates.

MRY_ERR_INVALID_HANDLE

if hView is not a valid handle to a view.

MRY_ERR_NULL_POINTER

if hView is NULL.

MRY_ERR_INTERNAL_ERROR

if Moray is in an unstable state.

Remarks

The coordinates are pixel coordinates. The pixel is checked to be on the bitmap. Check the nWidth and nHeight members of the MRY_SCN_VIEWINFO structure to get the size of the view.

NEW! NOTE: this function will fail in Moray V3.5. In earlier versions it only works if the view is not in OpenGL mode.

See Also

MRY_SCN_VIEWINFO, GetViewInfo


Top
 

MRY_SCN_VIEWINFO.fnSetMultiplePixels2D

The function MRY_SCN_VIEWINFO.fnSetMultiplePixels2D is a member function of the MRY_SCN_VIEWINFO struct and sets a pixel in a view to a certain color.

    long WINAPI fnSetMultiplePixels2D(long hView, LPMRY_POINTS2D aPoints, int nNumPoints, int nOffsetX, int nOffsetY);

Parameters

hView

contains the handle of the view in which to set the pixels.

aPoints

is a pointer to an array of MRY_POINTS2D which are the pixels to set.

nNumPoints

contains the number of pixels to paint. Make sure that aPoints points to enough pixels.

nOffsetX

contains an horizontal offset that is added to the pixels in the aPoints struct.

nOffsetY

contains an vertical offset that is added to the pixels in the aPoints struct.

Return Values

MRY_ERR_NOT_SUPPORTED

is you are running under Moray V3.5 and later.

MRY_SUCCESS

if the pixels were all successfully set.

MRY_ERR_CLIPPED

if any of the pixels were outside the views coordinates.

MRY_ERR_INVALID_HANDLE

if hView is not a valid handle to a view.

MRY_ERR_NULL_POINTER

if hView is NULL.

MRY_ERR_VALUE_OUT_OF_RANGE

if you attempted to pass less than 1 point.

MRY_ERR_INTERNAL_ERROR

if Moray is in an unstable state.

Remarks

The coordinates are pixel coordinates. The pixels are checked to be on the bitmap and not painted if they are off. The routine does not abort if a pixel is off the bitmap. Check the nWidth and nHeight members of the MRY_SCN_VIEWINFO structure to get the size of the view.

NEW! NOTE: this function will fail in Moray V3.5. In earlier versions it only works if the view is not in OpenGL mode.

See Also

MRY_SCN_VIEWINFO, GetViewInfo


Top
 

MRY_SCN_VIEWINFO.fnDrawPolyLine2D

The function MRY_SCN_VIEWINFO.fnDrawPolyLine2D is a member function of the MRY_SCN_VIEWINFO struct and draws connected lines (a polyline) in a view.

    long WINAPI fnDrawPolyLine2D(long hView, LPMRY_POINTS2D aPoints, int nNumPoints, int nOffsetX, int nOffsetY);

Parameters

hView

contains the handle of the view in which to draw the polyline.

aPoints

is a pointer to an array of MRY_POINTS2D which contain the coordinates of the polyline.

nNumPoints

contains the number of points in the polyline. Make sure that aPoints points to enough coordinates.

nOffsetX

contains an horizontal offset that is added to the polyline in the aPoints struct.

nOffsetY

contains an vertical offset that is added to the polyline in the aPoints struct.

Return Values

MRY_ERR_NOT_SUPPORTED

is you are running under Moray V3.5 and later.

MRY_SUCCESS

if all the lines were successfully drawn with no clipping involved.

MRY_ERR_CLIPPED

if part(s) of the polyline were clipped.

MRY_ERR_INVALID_HANDLE

if hView is not a valid handle to a view.

MRY_ERR_NULL_POINTER

if hView is NULL.

MRY_ERR_VALUE_OUT_OF_RANGE

if you attempted to pass less than 1 point.

MRY_ERR_INTERNAL_ERROR

if Moray is in an unstable state.

Remarks

The coordinates are pixel coordinates. The color of the line is taken from the starting pixel coordinate of each segment. The function draws a line from aPoints[0] to aPoints[1] in the color defined in aPoints[0]. The next line is drawn from aPoints[1] to aPoints[2] in the color defined in aPoints[1], etc. The lines are clipped before being drawn (only the visible parts of the lines are drawn). Check the nWidth and nHeight members of the MRY_SCN_VIEWINFO structure to get the size of the view.

NEW! NOTE: this function will fail in Moray V3.5. In earlier versions it only works if the view is not in OpenGL mode.

See Also

MRY_SCN_VIEWINFO, GetViewInfo


Top
 

MRY_SCN_VIEWINFO.fnFillBlock2D

The function MRY_SCN_VIEWINFO.fnFillBlock2D is a member function of the MRY_SCN_VIEWINFO struct and fills a rectangle of a view with a certain color.

    long WINAPI fnFillBlock2D(long hView, LPMRY_POINTS2D aPoints, int nNumPoints, int nOffsetX, int nOffsetY);

Parameters

hView

contains the handle of the view in which to fill the rectangle.

nX1, nX2, nY1, nY2

are the pixel coordinates of rectangle to fill.

lColor

contains the color of the rectangle. Colors are in the form 0x00RRGGBB.

Return Values

MRY_ERR_NOT_SUPPORTED

is you are running under Moray V3.5 and later.

MRY_SUCCESS

if the rectangle was filled without being clipped.

MRY_ERR_CLIPPED

if the rectangle was clipped.

MRY_ERR_INVALID_HANDLE

if hView is not a valid handle to a view.

MRY_ERR_NULL_POINTER

if hView is NULL.

MRY_ERR_INTERNAL_ERROR

if Moray is in an unstable state.

Remarks

The rectangle is filled in pixel coordinates. The rectangle is clipped before being drawn (only the visible part of the rectangle is filled). Check the nWidth and nHeight members of the MRY_SCN_VIEWINFO structure to get the size of the view.

NEW! NOTE: this function will fail in Moray V3.5. In earlier versions it only works if the view is not in OpenGL mode.

See Also

MRY_SCN_VIEWINFO, GetViewInfo


Top
 

MRY_SCN_VIEWINFO.fnGetBitmapBits2D

The function MRY_SCN_VIEWINFO.fnGetBitmapBits2D is a member function of the MRY_SCN_VIEWINFO struct and fills a struct with information about the views raw bitmap data.

    long WINAPI fnGetBitmapBits2D(long hView, LPMRY_VIEW_BITMAP pViewBitmap);

Parameters

hView

contains the handle of the view whose bitmap is to be queried.

pViewBitmap

contains a pointer to a MRY_VIEW_BITMAP structure that is to receive the bitmap data of the view.

Return Values

MRY_ERR_NOT_SUPPORTED

is you are running under Moray V3.5 and later.

MRY_SUCCESS

if the structure pointed to by pViewBitmap was successfully initialized.

MRY_ERR_VERSION_NOT_SUPPORTED

if nVersion member of the MRY_VIEW_BITMAP indicates that Moray cannot support the struct.

MRY_ERR_INVALID_HANDLE

if hView is not a valid handle to a view.

MRY_ERR_NULL_POINTER

if hView is NULL.

MRY_ERR_INTERNAL_ERROR

if Moray is in an unstable state.

Remarks

A plugin can use the information returned to directly draw into the views bitmap. Note that the plugin is responsible for ensuring no memory overwrites occur. The bitmap is buffered, so once

NEW! NOTE: this function will fail in Moray V3.5. In earlier versions it only works if the view is not in OpenGL mode.

See Also

MRY_SCN_VIEWINFO, MRY_VIEW_BITMAP, GetViewInfo


Top
 

MRY_SCN_VIEWINFO.fnGetWorldCoord

The function MRY_SCN_VIEWINFO.fnGetWorldCoord is a member function of the MRY_SCN_VIEWINFO struct and can be used to determine to what world position a certain pixel corresponds.

    long WINAPI fnGetWorldCoord(long hView, int nX, int nY, LPMRY_VECTOR pWorldPos);

Parameters

hView

contains the handle of the view in which to determine the coordinates.

nX, nY

are the coordinates of the pixel whose world coordinate is to be determined.

pWorldPos

contains a pointer to a MRY_VECTOR structure that is to receive the world coordinates of the pixel.

Return Values

MRY_SUCCESS

if the structure pointed to by pWorldPos was successfully set.

MRY_ERR_INVALID_HANDLE

if hView is not a valid handle to a view.

MRY_ERR_NULL_POINTER

if hView is NULL.

Remarks

The pixel coordinates need not be inside the view bitmap. The world coordinates are stored in the vector according to the type of view being queried. If it is a XY-View (see the nType variable of the MRY_SCN_VIEWINFO struct) the dX and dY variables are set and dZ is set to zero. Correspondingly, the dX and dZ variables are set and dY is set to zero for XZ-views and the dY and dZ variables are set and dX is set to zero for YZ-views. For XYZ-views (camera views) the function does not return valid coordinates.

See Also

MRY_SCN_VIEWINFO, MRY_VIEW_BITMAP, MRY_VECTOR, GetViewInfo


Top
 

MRY_SCN_VIEWINFO.fnSnapWorldCoord

The function MRY_SCN_VIEWINFO.fnSnapWorldCoord is a member function of the MRY_SCN_VIEWINFO struct that can be used to snap world coordinates

    long WINAPI fnSnapWorldCoord(long hView, LPMRY_VECTOR pPoint, int nFlags);

Parameters

hView

contains the handle of a view.

pPoint

contains a pointer to the vector to be snapped.

nFlags

contains flags that determine the type of snapping.

Return Values

MRY_SUCCESS

if the coordinate was snapped.

MRY_ERR_INVALID_HANDLE

if hView is not a valid handle to a view.

MRY_ERR_NULL_POINTER

if hView is NULL.

Remarks

This function snaps a world coordinate according to the snap settings in Moray and the flags passed. Although you need to pass a valid hView, the snapping values are global to all views, so it doesn't matter which view you pass.
The nFlags parameter can contain the following values:


Note that the scale, rot and translation flags are mutually exclusive. Only one of them will be applied, even if more than one is specified.

Available in V1.09 of the struct and later.

See Also

MRY_SCN_VIEWINFO, GetViewInfo


Top
 

MRY_SCN_VIEWINFO.fnGetScreenCoord

The function MRY_SCN_VIEWINFO.fnGetScreenCoord is a member function of the MRY_SCN_VIEWINFO struct and can be used to determine to what pixel coordinate a world position corresponds.

    long WINAPI fnGetScreenCoord(long hView, LPMRY_VECTOR pWorldPos, LPMRY_POINTS2D pPoint);

Parameters

hView

contains the handle of the view in which to determine the pixel coordinates.

pWorldPos

contains a pointer to a MRY_VECTOR structure that contains the world coordinate.

pPoint

contains a pointer to a MRY_POINTS2D structure that is to receive the pixel coordinates.

Return Values

MRY_SUCCESS

if the point was successfully converted. Always returned for 2D views. Returned for 3D views if the pixel is inside the view.

MRY_ERR_VALUE_OUT_OF_RANGE

is returned for 3D views if the value in pPoint is outside the visible view.

MRY_ERR_INVALID_HANDLE

if hView is not a valid handle to a view.

MRY_ERR_NULL_POINTER

if hView is NULL.

Remarks

For 2D-views the pixel coordinates are always returned.
For 3D-views, Moray attempts to find the real-world coordinate in the Z=0 plane and returns the pixel coordinate if possible. If the user clicked somewhere where the coordinate could not be determined (for example when the camera faces up away from the Z=0 plane), the function returns the MRY_ERR_VALUE_OUT_OF_RANGE value and the contents of pPoint are zero.

See Also

MRY_POINTS2D, MRY_SCN_VIEWINFO, MRY_VECTOR, GetViewInfo


Top
 

MRY_SCN_VIEWINFO.fnZoomToFit

The function MRY_SCN_VIEWINFO.fnZoomToFit is a member function of the MRY_SCN_VIEWINFO struct that can be used to zoom the view to the scene or to an object.

    long WINAPI fnZoomToFit(long hView, long hObjID);

Parameters

hView

contains the handle of the view to be zoomed.

hObjID

contains a handle to the object to which to zoom the view. If it is NULL, the view is zoomed to the scene.

Return Values

MRY_SUCCESS

if the view was zoomed.

MRY_ERR_NOT_VALID_OBJECT

if hObjID is not NULL and not a valid object.

MRY_ERR_INVALID_HANDLE

if hView is not a valid handle to a view.

MRY_ERR_NULL_POINTER

if hView is NULL.

MRY_ERR_INTERNAL_ERROR

if Moray is in an unstable state.

Remarks

To zoom to an object pass its handle in hObjID. If the object has no wireframe representation the zoom may fail (without notice).
To zoom to the entire scene pass a NULL handle in hObjID.
The view is automatically redrawn.

See Also

MRY_SCN_VIEWINFO, GetViewInfo


Top
 

MRY_SCN_VIEWINFO.fnWriteString

The function MRY_SCN_VIEWINFO.fnWriteString is a member function of the MRY_SCN_VIEWINFO struct that can be used to write text to the view.

    long WINAPI fnWriteString(long hView, const char *achBuf, long nColor, MRY_VECTOR *vPos);

Parameters

hView

contains the handle of the view to be written to.

achBuf

contains the string to be written.

nColor

contains the color of the text (in the form 0x00RRGGBB).

vPos

contains the position of the text in the view (in real world coordinates).

Return Values

MRY_SUCCESS

if the strign was written.

MRY_ERR_INVALID_HANDLE

if hView is not a valid handle to a view.

MRY_ERR_NULL_POINTER

if hView is NULL.

Remarks

Note that this function only works when a redraw is actually taking place. It will not work when no rendering is taking place. Its primary use is for outputting text that is related to an object from that objects rendering code.

Available in V1.08 of the struct and later.

See Also

MRY_SCN_VIEWINFO, GetViewInfo


Top
 

MRY_SCN_VIEW_SCREEN_SPACE


   struct MRY_SCN_VIEW_SCREEN_SPACE;

The struct MRY_SCN_VIEW_SCREEN_SPACE is used by the RequestScreenSpace function to handle screen real estate reservations.

A plugin can reserve a band of space along one of the four edges of the viewport. Moray resizes its views accordingly to make space for the reservations.

The MRY_SCN_VIEW_SCREEN_SPACE struct has the following members:

See Also

RequestScreenSpace


Top
 

MRY_SCN_UNDO_INFO


   struct MRY_SCN_UNDO_INFO;

The struct MRY_SCN_UNDO_INFO is used by the PushOntoUndoStack and UndoStackPopped function to handle undo operations the plugin can provide.

The MRY_SCN_UNDO_INFO struct is passed to Moray by the plugin in a call to the PushOntoUndoStack function when it does something that it would like to offer an Undo action for. The structure should contain all needed information for undoing this action in response to Moray calling the UndoStackPopped function. It is passed back to this function verbatim.

The MRY_SCN_UNDO_INFO struct has the following members:

See Also

UndoStackPopped, PushOntoUndoStack


Top
 

NEW!MRY_SCN_LAYERINFO


   struct MRY_SCN_LAYERINFO;

The struct MRY_SCN_LAYERINFO is used by the fnGetLayer, fnModifyLayer and fnAddLayer functions to handle the layers defined in a scene.

The MRY_SCN_LAYERINFO struct contains the following members:


When using this structure in fnModifyLayer or fnAddLayer, the plugin can set either the nColor variable to the color, or set it to zero and set the individual colors (nColorR, nColorG, nColorB).
If nColor is zero, Moray will use the individual components to set the color of the layer.
If nColor is MRY_LAYERCOLOR_NO_COLOR, Moray will clear the color of the layer.


Top
 

MRY_PROGRESS_DATA


   struct MRY_PROGRESS_DATA;

The struct MRY_PROGRESS_DATA is used by the ProgressFunction function to handle progress bars on Moray's status bar.

The MRY_PROGRESS_DATA struct is passed to Moray by the plugin in a call to the ProgressFunction function when it needs to work with a status bar (for example during long operations).

The MRY_PROGRESS_DATA struct has the following members:

See Also

ProgressFunction


Top
 

MRY_RENDER_OPTIONS


   struct MRY_RENDER_OPTIONS;

The struct MRY_RENDER_OPTIONS is used by the GetRenderOptions function to return the rendering options for either POV-Ray or Polyray.

The MRY_RENDER_OPTIONS struct has the following members:


Top
 

MRY_DLLINTERFACE


   struct MRY_DLLINTERFACE;

The struct MRY_DLLINTERFACE is used by the MRY_DLLINFO struct to let Moray know about the interfaces the plugin implements/uses.

The MRY_DLLINTERFACE struct has the following members:


Top
 

MRY_DLLINFO


   struct MRY_DLLINFO;

The struct MRY_DLLINFO is used to give Moray needed information about the plugin. It is used by the GetDLLInfo function, one of the exported functions of a plugin DLL.

The MRY_DLLINFO struct has the following members:

See Also

MRY_DLLINTERFACE


Top
 

MRY_INTERFACE


   struct MRY_INTERFACE;

The struct MRY_INTERFACE is embedded in the interfaces and is used to identify an interface. This structure is the first element of all the interface types (i.e. all interfaces sort of inherit from this struct).

The MRY_INTERFACE struct has the following members:

See Also

MRY_INTERFACEID


Top
 

MRY_INTERFACEID


   typedef unsigned char MRY_INTERFACEID[8];

The variable MRY_INTERFACEID is used to uniquely identify the interface it is embedded in.

See Also

MRY_INTERFACE


Top
 

MRY_OBJECTFUNCS


   struct MRY_OBJECTFUNCS;

The struct MRY_OBJECTFUNCS is the function block making up the Object Interface, which implements a plugin object.

The MRY_OBJECTFUNCS struct has the following data members:

See Also

Object Interface


Top
 

MRY_SCENEFUNCS


   struct MRY_SCENEFUNCS;

The struct MRY_SCENEFUNCS is the function block making up the Scene Interface, which can be used to access many of Morays internals.

The MRY_SCENEFUNCS struct has the following data members:

See Also

Scene Interface


Top
 

MRY_FILESFUNCS


   struct MRY_FILESFUNCS;

The struct MRY_FILESFUNCS is the function block making up the Files Interface, which can be used to access the file handling that Morays uses.

The MRY_FILESFUNCS struct has the following data members:

See Also

Files Interface


Top
 

MRY_IMPORTFUNCS


   struct MRY_IMPORTFUNCS;

The struct MRY_IMPORTFUNCS is the function block making up the Import Interface, which can be used to add a menu item to the Files|Import menu. The interface should import a file format.

The MRY_IMPORTFUNCS struct has the following data members:

See Also

Import Interface


Top
 

MRY_EXPORTFUNCS


   struct MRY_EXPORTFUNCS;

The struct MRY_EXPORTFUNCS is the function block making up the Export Interface, which can be used to add a menu item to the Files|Export menu. The interface should export to a file format.

The MRY_EXPORTFUNCS struct has the following data members:

See Also

Export Interface


Top
 

MRY_MENUFUNCS


   struct MRY_MENUFUNCS;

The struct MRY_MENUFUNCS is the function block making up the Menu Interface, which can be used to add a menu item or whole submenus to Morays menus.

The MRY_MENUFUNCS struct has no data members:

See Also

Menu Interface


Top
 

MRY_CONTROLLERFUNCS


   struct MRY_CONTROLLERFUNCS;

The struct MRY_CONTROLLERFUNCS is the function block making up the Controller Interface, which can be used to create a controller that allows interaction with plugin objects.



The MRY_CONTROLLERFUNCS struct has the following data members:

See Also

Controller Interface


Top
 

MRY_EXTERNALFUNCS


   struct MRY_EXTERNALFUNCS;

The struct MRY_EXTERNALFUNCS is the function block making up the External Interface, which can be used to create interfaces that plugins can use with each other, without Moray needing to know all the specifics.

The size of this struct is always 2048 bytes.

The MRY_EXTERNALFUNCS struct has the following data members:

See Also

External Interface


Top
 

MRY_SCN_SETTINGS


   struct MRY_SCN_SETTINGS;

The struct MRY_SCN_SETTINGS is a data structure that is used by the GetSettings function of the Scene Interface to access the Scene Settings of Moray (global settings, media, fog, background, radiosity).

The MRY_SCN_SETTINGS struct has the following member variables:


Top
 

NEW!MRY_SCN_SETTINGS.fnGetLayer

The function MRY_SCN_SETTINGS.fnGetLayer retrieves the layer information of one of the layers defined in the scene.

    long WINAPI fnGetLayer(int nIndex, LPMRY_SCN_LAYERINFO pLayer);

Parameters

nIndex

Contains the index of the layer whose information is to be retrieved.

pLayer

Contains a pointer to a MRY_SCN_LAYERINFO struct that will receive the layer information.

Return Values

MRY_SUCCESS

if the function was successful.

MRY_ERR_NULL_POINTER

if the pLayer is NULL.

MRY_ERR_VERSION_NOT_SUPPORTED

if the version of the layer info struct differs in the major version number.

MRY_ERR_INDEX_OUT_OF_RANGE

if nIndex is less than zero or larger than the number of layers defined in the scene.

Remarks

Retrieves information about the layers defined in the scene. To retrieve all layers and their settings, you should call this function with increasing nIndex values until it returns MRY_ERR_INDEX_OUT_OF_RANGE.

See Also

ModifyLayer, AddLayer, SetSettings


Top
 

NEW!MRY_SCN_SETTINGS.fnModifyLayer

The function MRY_SCN_SETTINGS.fnModifyLayer modifies the layer information of one of the layers defined in the scene.

    long WINAPI fnModifyLayer(int nIndex, LPMRY_SCN_LAYERINFO pLayer);

Parameters

nIndex

Contains the index of the layer whose information is to be modified.

pLayer

Contains a pointer to a MRY_SCN_LAYERINFO struct that contains the new layer information.

Return Values

MRY_SUCCESS

if the function was successful.

MRY_ERR_NULL_POINTER

if the pLayer is NULL.

MRY_ERR_VERSION_NOT_SUPPORTED

if the version of the layer info struct differs in the major version number.

MRY_ERR_INDEX_OUT_OF_RANGE

if nIndex is less than zero or larger than the number of layers defined in the scene.

MRY_ERR_LAYER_NOT_PRESENT

if the layer defined by nIndex could not be found (this should never occur).

MRY_ERR_LAYER_ID_ILLEGAL

if the nID member of the MRY_SCN_LAYERINFO struct pointed to by pLayer contains a different number than the one defined by nIndex

Remarks

Modifies information of a layer defined in the scene. You should use GetLayer to retrieve the data, modify the struct and then call ModifyLayer with the same parameters.

See Also

GetLayer, AddLayer, SetSettings


Top
 

NEW!MRY_SCN_SETTINGS.fnAddLayer

The function MRY_SCN_SETTINGS.fnAddLayer adds a layer to the current scene.

    long WINAPI fnAddLayer(LPMRY_SCN_LAYERINFO pLayer, int *nIndex);

Parameters

pLayer

Contains a pointer to a MRY_SCN_LAYERINFO struct that contains the layer information to be added.

nIndex

Contains a pointer a variable that will contain the index of the new layer that was added.

Return Values

MRY_SUCCESS

if the function was successful.

MRY_ERR_NULL_POINTER

if the pLayer is NULL.

MRY_ERR_VERSION_NOT_SUPPORTED

if the version of the layer info struct differs in the major version number.

MRY_ERR_INDEX_OUT_OF_RANGE

if nIndex is less than zero or larger than the number of layers defined in the scene.

MRY_ERR_LAYER_TOO_MANY

if more than 63 layers are defined.

Remarks

Fill out the struct pointed to by pLayer with the required information and then call this function. You do not need to set the nID member, this is automatically set by Moray to be unique within the scene.

See Also

GetLayer, ModifyLayer, SetSettings


Top
 

MRY_SCN_SETTINGS.fnSetFog

The function MRY_SCN_SETTINGS.fnSetFog is a function that the plugin can provide to set the parameters of a fog in the scene.

    long WINAPI fnSetFog(int nIndex, LPMRY_SCN_FOG pFog);

Parameters

nIndex

Contains the index of the fog to be set.

pFog

Contains a pointer to a MRY_SCN_FOG struct that contains the parameters of the fog.

Return Values

MRY_SUCCESS

should be returned if the fog was successfully set.

Remarks

This function is called by Moray if the plugin has set this member of the MRY_SCN_SETTINGS struct before calling SetSettings of the Scene Interface.

Moray will clear it's current fog list and will then call this function as many times as specified in the nNumFogs member, transferring the fog parameters from the passed struct to its internal fog list.

See Also

MRY_SCN_SETTINGS, SetSettings


Top
 

MRY_SCN_SETTINGS.fnGetFog

The function MRY_SCN_SETTINGS.fnGetFog is a function that Moray provides for the plugin to query the parameters of fogs in the scene.

    long WINAPI fnGetFog(int nIndex, LPMRY_SCN_FOG pFog);

Parameters

nIndex

Contains the index of the fog to be queried.

pFog

Contains a pointer to a MRY_SCN_FOG struct that will be set to the parameters of the fog.

Return Values

MRY_SUCCESS

is returned if the fog was successfully retrieved.

MRY_ERR_INDEX_OUT_OF_RANGE

if the fog specified by nIndex is out of range.

MRY_ERR_INTERNAL_ERROR

if something is wrong.

MRY_ERR_NULL_POINTER

if pFog is NULL.

MRY_ERR_VERSION_NOT_SUPPORTED

if the version of the struct is incompatible.

Remarks

This function can be called by the plugin to query the fog settings in the scene.

See Also

MRY_SCN_SETTINGS, SetSettings


Top
 

MRY_SCN_FOG


   struct MRY_SCN_FOG;

The struct MRY_SCN_FOG is a data structure that is used by the MRY_SCN_SETTINGS struct to pass fog information to and from Moray.

The MRY_SCN_FOG struct has the following member variables:

See Also

MRY_SCN_SETTINGS, Scene Interface


Top
 

NEW!MRY_SCN_PHOTONS


   struct MRY_SCN_PHOTONS;

The struct MRY_SCN_PHOTONS is a data structure that is used by the MRY_SCN_SETTINGS struct to pass photon information to and from Moray.

The MRY_SCN_PHOTONS struct has the following member variables:

See Also

MRY_SCN_SETTINGS, Scene Interface


Top