◆
~MaterialPreviewData()
成员函数文档编制
◆
Init()
[1/5]
Initializes the material preview with
pChannel
.
-
参数
-
[in]
|
pChannel
|
The initial preview source. The caller owns the pointed channel.
|
[in]
|
lCount
|
The dirty count. Used to detect changes.
|
-
返回
-
true
if successful, otherwise
false
.
◆
Init()
[2/5]
Initializes the material preview with
pShader
.
-
参数
-
[in]
|
pShader
|
The initial preview source. The caller owns the pointed shader.
|
[in]
|
lCount
|
The dirty count. Used to detect changes.
|
-
返回
-
true
if successful, otherwise
false
.
◆
Init()
[3/5]
Initializes the material preview with
pMaterial
.
-
参数
-
[in]
|
pMaterial
|
The initial preview source. The caller owns the pointed material.
|
[in]
|
lCount
|
The dirty count. Used to detect changes.
|
-
返回
-
true
if successful, otherwise
false
.
◆
Init()
[4/5]
Initializes the material preview with
pImage
.
-
参数
-
[in]
|
pImage
|
The initial preview source. The caller owns the pointed bitmap.
|
[in]
|
lCount
|
The dirty count. Used to detect changes.
|
-
返回
-
true
if successful, otherwise
false
.
◆
Init()
[5/5]
Initializes the material preview with a custom image hook. The hook will handle all host messages.
-
参数
-
[in]
|
fn
|
The callback for the preview.
|
[in]
|
pUserData
|
The user data. Passed along to the hook. May be deleted after the function has finished.
|
[in]
|
lUserID
|
A user ID for the material preview. Used to identify the callback.
|
[in]
|
lCount
|
The dirty count. Increment this whenever a parameter has been changed.
|
-
返回
-
true
if successful, otherwise
false
.
◆
AnimatePreview()
void AnimatePreview
|
(
|
Bool
|
bAnimate
|
)
|
|
Sets the preview animation state.
-
参数
-
[in]
|
bAnimate
|
The new animation state.
|
◆
PreviewIsAnimated()
Bool
PreviewIsAnimated
|
(
|
|
)
|
|
Checks the preview animation state.
-
返回
-
The preview animation state.
◆
SetPreviewType()
Sets the preview type.
-
参数
-
◆
GetPreviewType()
Checks the preview type.
-
返回
-
The preview type:
MatPreviewType
◆
SetUserPreviewSceneName()
Sets the user preview scene name.
-
参数
-
[in]
|
strName
|
The new user preview scene name.
|
◆
GetUserPreviewSceneName()
String
GetUserPreviewSceneName
|
(
|
|
)
|
|
Retrieves the user preview scene name.
-
返回
-
The user preview scene name.
◆
SetPreviewSize()
Sets the preview size.
-
参数
-
◆
GetPreviewSize()
Retrieves the preview size.
-
返回
-
The preview size.
◆
SetObjectMatrix()
void SetObjectMatrix
|
(
|
const
矩阵
&
|
m
|
)
|
|
Sets the object matrix.
-
参数
-
[in]
|
m
|
The new object matrix.
|
◆
GetObjectMatrix()
Bool
GetObjectMatrix
|
(
|
矩阵
&
|
m
|
)
|
|
Retrieves the object matrix.
-
参数
-
[out]
|
m
|
Assigned the object matrix, if not cleared.
|
-
返回
-
true
if successful,
false
if the object matrix is not initialized.
◆
ClearObjectMatrix()
void ClearObjectMatrix
|
(
|
|
)
|
|
Clears the object matrix, i.e to an uninitialized state.
◆
GetWorldSize()
Retrieves the world size.
-
返回
-
The world size.
◆
SetWorldSize()
void SetWorldSize
|
(
|
Float
|
r
|
)
|
|
Sets the world size.
-
参数
-
[in]
|
r
|
The new world size.
|
◆
GetPreviewStartTime()
Float
GetPreviewStartTime
|
(
|
|
)
|
|
Retrieves the preview start time.
-
返回
-
The preview start time.
◆
SetPreviewStartTime()
void SetPreviewStartTime
|
(
|
Float
|
r
|
)
|
|
Sets the preview start time.
-
参数
-
[in]
|
r
|
The new start time.
|
◆
GetEnvironment()
void GetEnvironment
|
(
|
向量
&
|
col
,
|
|
|
Float
&
|
strength
|
|
)
|
|
|
Gets the environment data.
-
参数
-
[out]
|
col
|
Assigned the environment color.
|
[out]
|
strength
|
Assigned the environment strength.
|
◆
SetEnvironment()
void SetEnvironment
|
(
|
const
向量
&
|
col
,
|
|
|
const
Float
&
|
strength
|
|
)
|
|
|
Sets the environment data.
-
参数
-
[in]
|
col
|
The new environment color.
|
[in]
|
strength
|
The new environment strength.
|
◆
GetDirtyCount()
Retrieves the dirty count for the preview.
-
返回
-
The dirty count.
◆
GetRegion()
Retrieves the current selection region.
-
参数
-
[out]
|
l
|
Assigned the left boundary, between
0
and
1
.
|
[out]
|
t
|
Assigned the top boundary, between
0
and
1
.
|
[out]
|
r
|
Assigned the right boundary, between
0
and
1
.
|
[out]
|
b
|
Assigned the bottom boundary, between
0
and
1
.
|
-
返回
-
true
if the region could be retrieved, otherwise
false
.
◆
SetRegion()
Sets a selection region in the preview.
-
参数
-
[in]
|
bActive
|
Determines if the rectangle is active or not.
|
[in]
|
l
|
The new left boundary, between
0
and
1
.
|
[in]
|
t
|
The new top boundary, between
0
and
1
.
|
[in]
|
r
|
The new right boundary, between
0
and
1
.
|
[in]
|
b
|
The new bottom boundary, between
0
and
1
.
|
◆
GetPreviewChannel()
Int32
GetPreviewChannel
|
(
|
|
)
|
|
Retrieves the channel used for preview.
-
返回
-
The channel:
CHANNEL
◆
SetPreviewChannel()
void SetPreviewChannel
|
(
|
Int32
|
lChannel
|
)
|
|
Sets the channel used for preview.
-
参数
-
[in]
|
lChannel
|
The new channel:
CHANNEL
|
◆
GetReflectionLayer()
Int32
GetReflectionLayer
|
(
|
|
)
|
|
Retrieves the reflection layer used for preview.
-
由于
-
R16
-
返回
-
The reflection layer ID or
NOTOK
if unset.
◆
SetReflectionLayer()
void SetReflectionLayer
|
(
|
Int32
|
lLayer
|
)
|
|
Sets the reflection layer used for preview.
-
注意
-
Suited to test a specific reflectance layer. This disables several material properties in the preview like color and transparency. It also only shows the effect of the reflectance layer with ID
lLayer
if any.
Make sure to check the layer with ID
lLayer
exists before setting this, otherwise one may get a pure-black material preview.
Keep always in mind that reflection layers can be removed any time (both by user and via API), therefore a specific layer ID could be no longer valid.
-
由于
-
R16
-
参数
-
[in]
|
lLayer
|
The reflection layer ID to set. Pass
NOTOK
to revert back to normal behavior i.e. to show all material properties and all reflection layers.
|