VolumeInterface Class Reference

#include <volume.h>

Inheritance diagram for VolumeInterface:

详细描述

VolumeInterface represents a core volume object in cinema.

公共成员函数

MAXON_METHOD Result < void >  LoadFromFile (const Url &url, Float scale, Int gridIndex)
MAXON_METHOD Result < void >  WriteToFile (const Url &url, Float scale, const DataDictionary &metaData=DataDictionary()) const
MAXON_METHOD Bool   HasGrid () const
MAXON_METHOD GRIDTYPE   GetGridType () const
MAXON_METHOD GRIDCLASS   GetGridClass () const
MAXON_METHOD void  SetGridClass ( GRIDCLASS gridClass)
MAXON_METHOD void  SetGridTransform ( 矩阵 newTransform)
MAXON_METHOD 矩阵   GetGridTransform () const
MAXON_METHOD void  SetGridName ( String name) const
MAXON_METHOD String   GetGridName () const
const MAXON_METHOD Range < 向量 > &  GetWorldBoundingBox () const
MAXON_METHOD IntVector32   GetActiveVoxelDim () const
MAXON_METHOD Int   GetActiveVoxelCount () const
MAXON_METHOD 数据   GetBackground () const
MAXON_METHOD Int   GetMemUsage () const
MAXON_METHOD Range < Float GetMinMaxValues ( Bool includeBackground=false) const

静态公共成员函数

static MAXON_METHOD Result < Volume >  CreateFromFile (const Url &url, Float scale, Int gridIndex)

私有成员函数

  MAXON_INTERFACE ( VolumeInterface , MAXON_REFERENCE_COPY_ON_WRITE , "net.maxon.volume.interface.volume")

Private Attributes

  MAXON_INTERFACE_SINGLE_IMPLEMENTATION

成员函数文档编制

◆  MAXON_INTERFACE()

MAXON_INTERFACE ( VolumeInterface   ,
MAXON_REFERENCE_COPY_ON_WRITE   ,
"net.maxon.volume.interface.volume"   
)
private

◆  CreateFromFile()

static MAXON_METHOD Result <Volume> CreateFromFile ( const Url url ,
Float   scale ,
Int   gridIndex  
)
static

Creates a new volume from a .vdb file.

参数
[in] url The url of the file.
[in] scale The scale to load the volume with.
[in] gridIndex The index of the grid in the file.
返回
The newly created Volume.

◆  LoadFromFile()

MAXON_METHOD Result <void> LoadFromFile ( const Url url ,
Float   scale ,
Int   gridIndex  
)

Loads a grid from .vdb file into this volume object.

参数
[in] url The url of the file.
[in] scale The scale to load the volume with.
[in] gridIndex The index of the grid in the file.
返回
OK on success.

◆  WriteToFile()

MAXON_METHOD Result <void> WriteToFile ( const Url url ,
Float   scale ,
const DataDictionary &  metaData = DataDictionary()  
) const

Writes the attached grid to a .vdb file.

参数
[in] url The url of the file.
[in] scale The scale to write the volume with.
[in] metaData Optional meta data to write to the file. These need to be stored with a string key in the data dictionary.
返回
OK on success.

◆  HasGrid()

MAXON_METHOD Bool HasGrid ( ) const

Retrieve if a grid is attached to this volume.

返回
True if this volume holds a grid.

◆  GetGridType()

MAXON_METHOD GRIDTYPE GetGridType ( ) const

Retrieve the datatype of this grid.

返回
The GRIDTYPE of this volume.

◆  GetGridClass()

MAXON_METHOD GRIDCLASS GetGridClass ( ) const

Retrieve the grid class of this grid.

返回
The GRIDCLASS of this volume.

◆  SetGridClass()

MAXON_METHOD void SetGridClass ( GRIDCLASS   gridClass )

Set the grid class for this grid.

参数
[in] gridClass The GRIDCLASS to set for this volume.

◆  SetGridTransform()

MAXON_METHOD void SetGridTransform ( 矩阵   newTransform )

Set the grid transform for this grid.

参数
[in] newTransform The transformation matrix to set for this volume.

◆  GetGridTransform()

MAXON_METHOD 矩阵 GetGridTransform ( ) const

Retrieve the grid transform for this grid.

返回
The transformation matrix of this volume.

◆  SetGridName()

MAXON_METHOD void SetGridName ( String   name ) const

Set the grid name for this grid.

参数
[in] name The name to set for this volume.

◆  GetGridName()

MAXON_METHOD String GetGridName ( ) const

Retrieve the grid name for this grid.

返回
The name of this volume.

◆  GetWorldBoundingBox()

const MAXON_METHOD Range < 向量 >& GetWorldBoundingBox ( ) const

Retrieve the bounding box of all active voxels of this grid.

返回
The bounding box of the active voxels of this volume.

◆  GetActiveVoxelDim()

MAXON_METHOD IntVector32 GetActiveVoxelDim ( ) const

Retrieve the active voxel dimensions.

返回
The active voxel dimensions of this volume.

◆  GetActiveVoxelCount()

MAXON_METHOD Int GetActiveVoxelCount ( ) const

Retrieve the active voxel count.

返回
The amount of active voxels in this volume.

◆  GetBackground()

MAXON_METHOD 数据 GetBackground ( ) const

Retrieve the background value of the grid.

返回
The background value of the grid.

◆  GetMemUsage()

MAXON_METHOD Int GetMemUsage ( ) const

Returns the amount of memory in bytes used by this volume.

返回
The memory usage in bytes.

◆  GetMinMaxValues()

MAXON_METHOD Range < Float > GetMinMaxValues ( Bool   includeBackground = false ) const

Returns the Min and Max values of the volume. If it is the first time being called the resulting values are being cached. Only works for numerical gridtypes. If the volume is a vector volume, the magnitude of the vectors will be used.

参数
[in] includeBackground If true the volume background will be part of the Range , otherwise not.
返回
The Minimum and Maximum Value of this volume.

Member Data Documentation

◆  MAXON_INTERFACE_SINGLE_IMPLEMENTATION

MAXON_INTERFACE_SINGLE_IMPLEMENTATION private