beastapi/beasttargetentity.h File Reference

#include "beastapitypes.h"

File Description

Target entities, the relationship between an instance and a bake target.

Enumerations

enum  ILBTargetEntityType { ILB_TT_TEXTURE = 0, ILB_TT_VERTEX }
 

Functions

ILBStatus ILBChangeTargetEntityType (ILBTargetEntityHandle entity, ILBTargetEntityType type)
 
ILBStatus ILBGetAtlasInformation (ILBTargetEntityHandle te, int32 *framebufferIndex, ILBVec2 *offset, ILBVec2 *scale)
 
ILBStatus ILBGetNormalizationData (ILBTargetEntityHandle entity, ILBRenderPassHandle pass, int channel, float *minValue, float *maxValue)
 
ILBStatus ILBGetTargetEntityInstance (ILBTargetEntityHandle entity, ILBStringHandle *name)
 
ILBStatus ILBGetTargetEntityResolution (ILBTargetEntityHandle entity, int32 *width, int32 *height)
 
ILBStatus ILBGetTargetEntityType (ILBTargetEntityHandle entity, ILBTargetEntityType *type)
 
ILBStatus ILBSetBakeResolution (ILBTargetEntityHandle target, int32 width, int32 height)
 
ILBStatus ILBSetBakeUVSet (ILBTargetEntityHandle target, ILBConstString uvName)
 
ILBStatus ILBSetTexelScale (ILBTargetEntityHandle target, float scale)
 
ILBStatus ILBSetUVTransform (ILBTargetEntityHandle target, const ILBVec2 *offset, const ILBVec2 *scale)
 

Enumeration Type Documentation

Describes what kind of baking a target entity is using.

Enumerator
ILB_TT_TEXTURE 

Texture baking.

ILB_TT_VERTEX 

Vertex baking.

Function Documentation

ILBStatus ILBChangeTargetEntityType ( ILBTargetEntityHandle  entity,
ILBTargetEntityType  type 
)

Changes the type of a target entity when running an Live Ernst job.

Parameters
entitythe target to change type
typethe new type
ILBStatus ILBGetAtlasInformation ( ILBTargetEntityHandle  te,
int32 *  framebufferIndex,
ILBVec2 offset,
ILBVec2 scale 
)

Gets the atlas information for a target entity Only valid on Atlas texture target entities and texture target entities.

Parameters
tethe target entity to get atlas information for
framebufferIndexa pointer to write where the index of the framebuffer
offseta pointer to write the offset in uv space of the atlased object.
scalea pointer to write the scale in uv space of the atlased object.
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetNormalizationData ( ILBTargetEntityHandle  entity,
ILBRenderPassHandle  pass,
int  channel,
float *  minValue,
float *  maxValue 
)

Returns the minimum/maximum value in the selected entity.

Used to scale the LDR values read from the frame buffer to preserve the dynamic range.
The function will fail if the pass has not enabled normalization.

Parameters
entitythe entity for which scale factors should be returned.
passthe render pass to get normalization values from
channelthe framebuffer channel to use (ignored for global normalization)
minValuethe minimum value for the framebuffer/entity.
maxValuethe maximum value for the framebuffer/entity.
Returns
The result of the operation.
ILBStatus ILBGetTargetEntityInstance ( ILBTargetEntityHandle  entity,
ILBStringHandle name 
)

Returns the name of the instance of a target entity.

Can only be used on update targets returned from an Ernst job.

Parameters
entitythe update target entity
namethe the name of the instance
+ Examples:
ILBStatus ILBGetTargetEntityResolution ( ILBTargetEntityHandle  entity,
int32 *  width,
int32 *  height 
)

Returns the bake resolution selected in an Ernst session.

Can only be used on update targets returned from an Ernst job and with type == ILB_TT_TEXTURE

Parameters
entitythe update target entity
widththe x texture resolution
heightthe y texture resolution
+ Examples:
ILBStatus ILBGetTargetEntityType ( ILBTargetEntityHandle  entity,
ILBTargetEntityType type 
)

Returns the type of baking selected in an Ernst session.

Can only be used on update targets returned from an Ernst job.

Parameters
entitythe update target entity
typethe baking type selected on the entity
+ Examples:
ILBStatus ILBSetBakeResolution ( ILBTargetEntityHandle  target,
int32  width,
int32  height 
)

Sets the requested resolution for the target entity.

For atlased targets: Will fail if the resolution is higher than the maximum resolution of the atlased target. For live Ernst targets: Will set the bake resolution of the instance attached to this entity. Not valid for other targets.

Parameters
targetthe target entity to set the resolution on
widththe requested width
heightthe requested height
Returns
The result of the operation
+ Examples:
ILBStatus ILBSetBakeUVSet ( ILBTargetEntityHandle  target,
ILBConstString  uvName 
)

Sets the uv set to use when baking the target entity.

Will use default if the uv set is not present in the instance. Only valid for texture and atlased target entities

Parameters
targetthe target entity to set the uv set for
uvNamethe name of the uv set to use
Returns
The result of the operation
ILBStatus ILBSetTexelScale ( ILBTargetEntityHandle  target,
float  scale 
)

Sets the relationship between world space coordinates and texels for an atlased target instance.

Only valid for atlased target instance.

Parameters
targetthe target entity to set the resolution on
scalethe number of texels each world space unit should cover
Returns
The result of the operation
+ Examples:
ILBStatus ILBSetUVTransform ( ILBTargetEntityHandle  target,
const ILBVec2 offset,
const ILBVec2 scale 
)

Sets the a uv transform for a bake shape.

It will place the shape in a specific location of the texture. Only valid for texture target entities

Parameters
targetthe target entity to set the uv transform on
offsetthe offset in uv space for the object
scalethe scale in uv space for the object
Returns
The result of the operation
+ Examples:

Go to the source code of this file.