|
|
|
|
Reference: Muli3D: CMuli3DVolume Class Reference
CMuli3DVolume Class Reference#include <m3dcore_volume.h>
Inheritance diagram for CMuli3DVolume:
List of all members.
Detailed Description
CMuli3DVolume implements a 3-dimensional image.
|
Public Member Functions |
result | Clear (const vector4 &i_vColor, const m3dbox *i_pBox) |
result | CopyToVolume (const m3dbox *i_pSrcBox, CMuli3DVolume *i_pDestVolume, const m3dbox *i_pDestBox, m3dtexturefilter i_Filter) |
m3dformat | fmtGetFormat () |
uint32 | iGetDepth () |
uint32 | iGetFormatFloats () |
uint32 | iGetHeight () |
uint32 | iGetWidth () |
result | LockBox (void **o_ppData, const m3dbox *i_pBox) |
CMuli3DDevice * | pGetDevice () |
void | SampleLinear (vector4 &o_vColor, float32 i_fU, float32 i_fV, float32 i_fW) |
void | SamplePoint (vector4 &o_vColor, float32 i_fU, float32 i_fV, float32 i_fW) |
result | UnlockBox () |
Protected Member Functions |
| CMuli3DVolume (class CMuli3DDevice *i_pParent) |
result | Create (uint32 i_iWidth, uint32 i_iHeight, uint32 i_iDepth, m3dformat i_fmtFormat) |
| ~CMuli3DVolume () |
Constructor & Destructor Documentation
|
Accessible by IBase. The destructor is called when the reference count reaches zero.
|
CMuli3DVolume::CMuli3DVolume |
( |
class CMuli3DDevice * |
i_pParent |
) |
[protected] |
|
|
Accessible by CMuli3DDevice which is the only class that may create a volume. - Parameters:
-
[in] | i_pParent | a pointer to the parent CMuli3DDevice-object. |
|
Member Function Documentation
result CMuli3DVolume::Clear |
( |
const vector4 & |
i_vColor, |
|
|
const m3dbox * |
i_pBox |
|
) |
|
|
|
Clears the volume to a given color. - Parameters:
-
[in] | i_vColor | color to clear the volume to. |
[in] | i_pBox | box to restrict clearing to. |
- Returns:
- s_ok if the function succeeds.
e_invalidparameters if the clear-box exceeds the volume's dimensions.
|
|
Copies the contents of the volume to another volume using the specified filtering method. - Parameters:
-
[in] | i_pSrcBox | source box to copy to the other volume. (Pass 0 to copy the entire volume.) |
[in] | i_pDestVolume | destination volume. |
[in] | i_pDestBox | destination-box. (Pass 0 for the entire destination-volume.) |
[in] | i_Filter | texture filter. |
- Returns:
- s_ok if the function succeeds.
e_invalidparameters if one of the two boxes is invalid or exceeds volume-dimensions.
e_invalidstate if the destination volume couldn't be locked.
|
|
Accessible by CMuli3DDevice which is the only class that may create a volume. - Parameters:
-
[in] | i_iWidth | width of the volume to be created in pixels. |
[in] | i_iHeight | height of the volume to be created in pixels. |
[in] | i_iDepth | depth of the volume to be created in pixels. |
[in] | i_fmtFormat | format of the volume to be created. Member of the enumeration m3dformat; m3dfmt_r32f, m3dfmt_r32g32f, m3dfmt_r32g32b32f or m3dfmt_r32g32b32a32f. |
- Returns:
- s_ok if the function succeeds.
e_invalidparameters if one or more parameters were invalid.
e_outofmemory if memory allocation failed.
e_invalidformat if an invalid format was encountered.
|
|
Returns the format of the volume. Member of the enumeration m3dformat; m3dfmt_r32f, m3dfmt_r32g32f, m3dfmt_r32g32b32f or m3dfmt_r32g32b32a32f.
|
uint32 CMuli3DVolume::iGetDepth |
( |
|
) |
|
|
|
Returns the depth of the volume in pixels.
|
uint32 CMuli3DVolume::iGetFormatFloats |
( |
|
) |
|
|
|
Returns the number of floats of the format, e [1,4].
|
uint32 CMuli3DVolume::iGetHeight |
( |
|
) |
|
|
|
Returns the height of the volume in pixels.
|
uint32 CMuli3DVolume::iGetWidth |
( |
|
) |
|
|
|
Returns the width of the volume in pixels.
|
result CMuli3DVolume::LockBox |
( |
void ** |
o_ppData, |
|
|
const m3dbox * |
i_pBox |
|
) |
|
|
|
Returns a pointer to the contents of the volume. - Parameters:
-
[out] | o_ppData | receives the pointer to the volume-data. |
[in] | i_pBox | box that will be locked and accessible. (Pass in 0 to lock the entire volume.) |
- Returns:
- s_ok if the function succeeds.
e_invalidparameters if one or more parameters were invalid.
e_invalidstate if the volume is already locked.
e_outofmemory if memory allocation failed.
- Note:
- Locking the entire volume is a lot faster than locking a sub-region, because no lock-buffer has to be created and the application may write to the volume directly.
|
|
Returns a pointer to the associated device. Calling this function will increase the internal reference count of the device. Failure to call Release() when finished using the pointer will result in a memory leak.
|
|
Samples the volume using bi-linear filtering. - Parameters:
-
[out] | o_vColor | receives the color of the pixel to be looked up. |
[in] | i_fU | u-component of the lookup-vector. |
[in] | i_fV | v-component of the lookup-vector. |
[in] | i_fW | w-component of the lookup-vector. |
|
|
Samples the volume using nearest point sampling. - Parameters:
-
[out] | o_vColor | receives the color of the pixel to be looked up. |
[in] | i_fU | u-component of the lookup-vector. |
[in] | i_fV | v-component of the lookup-vector. |
[in] | i_fW | w-component of the lookup-vector. |
|
result CMuli3DVolume::UnlockBox |
( |
|
) |
|
|
|
Unlocks the volume; modifications to its contents will become active. - Returns:
- s_ok if the function succeeds.
e_invalidstate if the volume is not locked.
|
|
|