c4d_tools.h File Reference

Classes

struct  SegmentSphereIntersectionData
 
class  LMinMax
 
class  SMinMax
 
class  Random
 
struct  RayShaderStackElement
 
struct  MsgGICSExData
 
struct  MsgGINewData
 
class  Stratified2DRandom
 
struct  DisplaceInfo
 
struct  VolumeData
 
class  VPBuffer
 
struct  VideoPostStruct
 
class  Render
 
struct  BakeProgressInfo
 
struct  BakeTextureResizeNotify
 
class  GeCipher256
 

Namespaces

 cinema
 

Macros

#define MAXRANGE
 
#define MAXELEMENTS
 
#define MIN_EPSILON
 

Typedefs

typedef LMinMax MinMax
 

Enumerations

enum  BakeTexEnums {
  BAKE_TEX_USE_CAMERA_VECTOR ,
  BAKE_TEX_USE_POLYSELECTION ,
  BAKE_TEX_AMBIENT_OCCLUSION ,
  BAKE_TEX_NORMAL ,
  BAKE_TEX_SURFACECOLOR ,
  BAKE_TEX_COLOR ,
  BAKE_TEX_DIFFUSION ,
  BAKE_TEX_LUMINANCE ,
  BAKE_TEX_ALPHA ,
  BAKE_TEX_ILLUMINATION ,
  BAKE_TEX_SHADOWS ,
  BAKE_TEX_BUMP ,
  BAKE_TEX_TRANSPARENCY ,
  BAKE_TEX_UVMAP ,
  BAKE_TEX_REFLECTION ,
  BAKE_TEX_DISPLACEMENT ,
  BAKE_TEX_WIDTH ,
  BAKE_TEX_HEIGHT ,
  BAKE_TEX_PIXELBORDER ,
  BAKE_TEX_FILL_COLOR ,
  BAKE_TEX_UV_LEFT ,
  BAKE_TEX_UV_RIGHT ,
  BAKE_TEX_UV_TOP ,
  BAKE_TEX_UV_BOTTOM ,
  BAKE_TEX_SUPERSAMPLING ,
  BAKE_TEX_USE_BUMP ,
  BAKE_TEX_NO_GI ,
  BAKE_TEX_CONTINUE_UV ,
  BAKE_TEX_USE_PHONG_TAG ,
  BAKE_TEX_COLORPROFILE ,
  BAKE_TEX_SHOW_STATUS ,
  BAKE_TEX_PROGRESS_BITMAP ,
  BAKE_TEX_GENERATE_UNDO ,
  BAKE_TEX_PREVIEW ,
  BAKE_TEX_COLOR_ILLUM ,
  BAKE_TEX_COLOR_SHADOWS ,
  BAKE_TEX_COLOR_LUMINANCE ,
  BAKE_TEX_COLOR_DIFFUSION ,
  BAKE_TEX_LUMINANCE_DIFFUSION ,
  BAKE_TEX_ILLUMINATION_SHADOWS ,
  BAKE_TEX_NORMAL_METHOD ,
  BAKE_TEX_NORMAL_METHOD_OBJECT ,
  BAKE_TEX_NORMAL_METHOD_TANGENT ,
  BAKE_TEX_NORMAL_METHOD_WORLD ,
  BAKE_TEX_NORMAL_FLIP_X ,
  BAKE_TEX_NORMAL_FLIP_Y ,
  BAKE_TEX_NORMAL_FLIP_Z ,
  BAKE_TEX_NORMAL_SWAP_YZ ,
  BAKE_TEX_NORMAL_SOURCE ,
  BAKE_TEX_NORMAL_USE_RAYCAST ,
  BAKE_TEX_SURFACE_ILLUMINATION ,
  BAKE_TEX_AO_VERTEX_MAP ,
  BAKE_TEX_AO_SELFINTERSECTION ,
  BAKE_TEX_AO_VERTEXMAPS ,
  BAKE_TEX_DISPLACEMENT_SOURCE ,
  BAKE_TEX_DISPLACEMENT_HEIGHT ,
  BAKE_TEX_DISPLACEMENT_METHOD ,
  BAKE_TEX_DISPLACEMENT_METHOD_OBJECT ,
  BAKE_TEX_DISPLACEMENT_METHOD_WORLD ,
  BAKE_TEX_DISPLACEMENT_METHOD_TANGENT ,
  BAKE_TEX_DISPLACEMENT_METHOD_INTENSITY ,
  BAKE_TEX_DISPLACEMENT_METHOD_CENTEREDINTENSITY ,
  BAKE_TEX_DISPLACEMENT_METHOD_REDGREEN ,
  BAKE_TEX_DISPLACEMENT_SUBPOLY ,
  BAKE_TEX_DISPLACEMENT_SUBPOLY_SUBDIVISION ,
  BAKE_TEX_DISPLACEMENT_SUBPOLY_ROUND ,
  BAKE_TEX_DISPLACEMENT_SUBPOLY_ROUNDCONTOUR ,
  BAKE_TEX_DISPLACEMENT_SUBPOLY_HQREMAPPING ,
  BAKE_TEX_DISPLACEMENT_SUBPOLY_MAPRESULT ,
  BAKE_TEX_DISPLACEMENT_SUBPOLY_KEEPEDGES ,
  BAKE_TEX_DISPLACEMENT_SUBPOLY_DISTRIBUTION ,
  BAKE_TEX_RAYCAST_USE_MAX_DISTANCE ,
  BAKE_TEX_RAYCAST_CUSTOM_MAX_DISTANCE ,
  BAKE_TEX_RAYCAST_USE_AUTO_SPIKE_FILTER_THRESHOLD ,
  BAKE_TEX_RAYCAST_CUSTOM_SPIKE_FILTER_THRESHOLD ,
  BAKE_TEX_OPTIMAL_MAPPING ,
  BAKE_TEX_OPTIMAL_MAPPING_OFF ,
  BAKE_TEX_OPTIMAL_MAPPING_CUBIC ,
  BAKE_TEX_OPTIMAL_MAPPING_ANGLE ,
  BAKE_TEX_OPTIMAL_MAPPING_PACKED ,
  BAKE_TEX_OPTIMAL_MAPPING_RELAXCOUNT ,
  BAKE_TEX_OPTIMAL_MAPPING_PREVIEW ,
  BAKE_TEX_NO_INIT_BITMAP ,
  BAKE_TEX_AUTO_SIZE ,
  BAKE_TEX_AUTO_SIZE_MIN ,
  BAKE_TEX_AUTO_SIZE_MAX ,
  BAKE_TEX_AUTO_PIXEL_SIZE ,
  BAKE_TEX_STATUSBAR ,
  BAKE_TEX_DUMMY
}
 
enum class  BAKE_STATE {
  NONE ,
  PREPARE ,
  GI_PREPASS ,
  FILL_IMAGE ,
  COMPLETE ,
  INITIALIZE ,
  RESIZENOTIFY
}
 

Functions

Float64 StepEx (Float64 a, Float64 x)
 
Float32 Boxstep (Float32 a, Float32 b, Float32 x)
 
Float64 Boxstep (Float64 a, Float64 b, Float64 x)
 
Float32 Smoothstep (Float32 a, Float32 b, Float32 x)
 
Float64 Smoothstep (Float64 a, Float64 b, Float64 x)
 
Float32 Modulo (Float32 a, Float32 b)
 
Float64 Modulo (Float64 a, Float64 b)
 
Int32 LModulo (Int32 a, Int32 b)
 
Int64 LModulo (Int64 a, Int64 b)
 
Float32 Bias (Float32 b, Float32 x)
 
Float64 Bias (Float64 b, Float64 x)
 
Float32 Truncate (Float32 x)
 
Float64 Truncate (Float64 x)
 
Matrix MatrixMove (const Vector &t)
 
Matrix MatrixScale (const Vector &s)
 
Matrix MatrixRotX (Float w)
 
Matrix MatrixRotY (Float w)
 
Matrix MatrixRotZ (Float w)
 
Vector MatrixToHPB (const Matrix &m, ROTATIONORDER rot_order, Bool isNormalized=false)
 
Vector VectorToHPB (const Vector &p)
 
Matrix HPBToMatrix (const Vector &hpb, ROTATIONORDER rot_order)
 
void MatrixToRotAxis (const Matrix &m, Vector *v, Float *w)
 
Matrix RotAxisToMatrix (const Vector &v, Float w)
 
Matrix RebuildMatrix (const Matrix &m)
 
Matrix DirectionVectorToRotationMatrix (const Vector &direction, const Vector &pivotDirection)
 
Vector GetOptimalAngle (const Vector &hpb_old, const Vector &hpb_new, ROTATIONORDER order)
 
Vector PointLineDistance (const Vector &p0, const Vector &v, const Vector &p)
 
Float PointLineSegmentDistance (const Vector &segmentPoint1, const Vector &segmentPoint2, const Vector &pos, Vector *intersectionPoint=nullptr, Float *lineOffset=nullptr)
 
Float PointLineSegmentDistance2D (const Vector &segmentPoint1, const Vector &segmentPoint2, const Vector &pos, Vector *intersectionPoint=nullptr, Float *lineOffset=nullptr)
 
Vector64 ReflectRay (const Vector64 &v, const Vector64 &n)
 
Bool SphereLineIntersection (const Vector &linePoint1, const Vector &linePoint2, const Vector &sphereCenter, Float sphereRadius, Float *intersection1=nullptr, Float *intersection2=nullptr, Vector *hitPoint1=nullptr, Vector *hitPoint2=nullptr)
 
Bool CircleLineIntersection (const Vector &linePoint1, const Vector &linePoint2, const Vector &circleCenter, Float circleRadius, Float *intersection1=nullptr, Float *intersection2=nullptr, Vector *hitPoint1=nullptr, Vector *hitPoint2=nullptr)
 
Bool SphereSegmentIntersection (const Vector &linePoint1, const Vector &linePoint2, const Vector &sphereCenter, Float sphereRadius, maxon::BaseArray< SegmentSphereIntersectionData > &intersections)
 
Bool CircleSegmentIntersection (const Vector &linePoint1, const Vector &linePoint2, const Vector &circleCenter, Float circleRadius, maxon::BaseArray< SegmentSphereIntersectionData > &intersections)
 
Vector RGBToHSV (const Vector &col)
 
Vector HSVToRGB (const Vector &col)
 
Vector RGBToHSL (const Vector &col)
 
Vector HSLtoRGB (const Vector &col)
 
Vector CalcSplinePoint (Float offset, SPLINETYPE type, Bool closed, Int32 pcnt, const Vector *padr, const Tangent *tadr=nullptr)
 
Vector CalcSplineTangent (Float offset, SPLINETYPE type, Bool closed, Int32 pcnt, const Vector *padr, const Tangent *tadr=nullptr)
 
void CalcSplineInsert (Float offset, SPLINETYPE type, Bool closed, Int32 pcnt, const Vector *padr, const Tangent *tadr, Int32 &pointIndex, Vector &resultPoint, Tangent &resultTangent, Vector &leftTangent, Vector &rightTangent)
 
Tangent TransformTangent (const Vector &newPos, const Vector &planeNormal, const Vector &position, const Tangent &tangent, TANGENTSIDE tangentSide, TANGENTTRANSFORMFLAG flags=TANGENTTRANSFORMFLAG::BREAK_SCALE)
 
void CalcSplineMovement (const Vector &newPos, Float offset, SPLINETYPE type, const Matrix &splineMg, BaseDraw *bd, const Vector &planeNormal, Bool closed, Bool lockTangentAngle, Bool lockTangentLength, BREAKTANGENTS breakTangents, Int32 pcnt, Vector *padr, Tangent *tadr)
 
Bool CalcSplineDefaultTangents (SPLINETYPE type, Bool closed, Int32 pcnt, const Vector *padr, Tangent *tadr)
 
PointObject * BooleanSplines (PointObject *initialSpline, AtomArray *booleanObjects, BaseDocument *doc, BaseDraw *bd, SPLINEBOOL_AXIS projectionAxis, SPLINEBOOL_MODE booleanMode)
 
Float SNoise (const Vector &p)
 
Float SNoise (const Vector &p, Float t)
 
Float Noise (const Vector &p)
 
Float Noise (const Vector &p, Float t)
 
Float PNoise (const Vector &p, const Vector &d)
 
Float PNoise (const Vector &p, Float t, const Vector &d, Float dt)
 
Float Turbulence (const Vector &p, Float oct, Bool abs)
 
Float Turbulence (const Vector &p, Float t, Float oct, Bool abs)
 
Float WavyTurbulence (const Vector &p, Float t, Float oct, Float start)
 
void InitFbm (Float *table, Int32 max_octaves, Float lacunarity, Float h)
 
Float Fbm (Float *table, const Vector &p, Float oct)
 
Float Fbm (Float *table, const Vector &p, Float t, Float oct)
 
Float RidgedMultifractal (Float *table, const Vector &p, Float oct, Float offset, Float gain)
 
Float CalcSpline (Float x, const Float *knot, Int32 nknots)
 
Vector CalcSpline (Float x, const Vector *knot, Int32 nknots)
 
Float SNoiseP (Vector p, Float t, Int32 t_repeat)
 
Float TurbulenceP (Vector p, Float t, Float oct, Bool abs, Int32 t_repeat)
 
Float FbmP (Float *table, Vector p, Float t, Float oct, Int32 t_repeat)
 
Float RidgedMultifractalP (Float *table, Vector p, Float t, Float oct, Float offset, Float gain, Int32 t_repeat)
 
RayObject * AllocRayObject (Int32 tex_cnt)
 
void FreeRayObject (RayObject *&op)
 
RayLight * AllocRayLight (BaseDocument *doc, BaseObject *op)
 
void FreeRayLight (RayLight *&lgt)
 
Bool IlluminateRayLight (RayLight *rl, Vector *color, Vector64 *light_vector, const Vector64 &p, const Vector64 &n)
 
void CalcRestrictionInc (const ObjectRestriction *lr, const RayObject *op, Bool &nodif, Bool &nospec)
 
enum cinema::BAKE_STATE MAXON_ENUM_LIST (BAKE_STATE)
 
BAKE_TEX_ERR BakeTexture (BaseDocument *doc, const BaseContainer &data, BaseBitmap *bmp, BaseThread *th, BakeProgressHook *hook, BakeProgressInfo *info)
 
BaseDocument * InitBakeTexture (BaseDocument *doc, TextureTag *textag, UVWTag *texuvw, UVWTag *destuvw, const BaseContainer &bc, BAKE_TEX_ERR *err=nullptr, BaseThread *th=nullptr)
 
BaseDocument * InitBakeTexture (BaseDocument *doc, TextureTag **textags, UVWTag **texuvws, UVWTag **destuvws, Int32 cnt, const BaseContainer &bc, BAKE_TEX_ERR *err=nullptr, BaseThread *th=nullptr)
 
Vector GetOptimalAngleI (const Vector &orot, const Vector &nrot, const ROTATIONORDER order, const Float angleDiff)
 

Variables

Vector64 l_empty
 
static const Float COLORTOINT_MULTIPLIER
 
static const Float PERCENT
 
static const Float THIRD
 
static const Float SIXTH
 
static const Int32 NOISE_RESOLUTION
 
 NONE
 
 PREPARE
 
 GI_PREPASS
 
 FILL_IMAGE
 
 COMPLETE
 
 INITIALIZE
 
 RESIZENOTIFY
 

Macro Definition Documentation

◆ MAXRANGE

#define MAXRANGE

Maximum value for metric data.

◆ MAXELEMENTS

#define MAXELEMENTS

Maximum number of points.

◆ MIN_EPSILON

#define MIN_EPSILON

Minimum epsilon value.

Variable Documentation

◆ NONE

NONE

None.

◆ PREPARE

PREPARE

Prepare.

◆ GI_PREPASS

GI_PREPASS

GI prepass.

◆ FILL_IMAGE

FILL_IMAGE

Fill image.

◆ COMPLETE

COMPLETE

Complete.

◆ INITIALIZE

INITIALIZE

Initialize.

◆ RESIZENOTIFY

RESIZENOTIFY

Resize notify. See BakeTextureResizeNotify.