InlineUniform (struct)

バージョン 1.12.0 で追加.

The InlineUniform represents a single value for an InlineMaterial. Essentially the InlineUniform is a variant storing all possible values as well as a type.

InlineUniform InlineUniform InlineUniform

/*
** Example: InlineUniform
*/

require InlineDrawing;
  
operator entry() {

  InlineUniform u_color('u_color', Color(1.0, 0.0, 0.0));
  u_color.setOptional();
  report(u_color.getColor());
  
}

/*
** Output:

{r:+1.0,g:+0.0,b:+0.0,a:+1.0}

*/

Methods

  InlineUniform ( in InlineUniform other )
  InlineUniform ( in String name, in Color value )
  InlineUniform ( in String name, in Float32 value )
  InlineUniform ( in String name, in InlineTexture value )
  InlineUniform ( in String name, in Integer value )
  InlineUniform ( in String name, in Mat33 value )
  InlineUniform ( in String name, in Mat44 value )
  InlineUniform ( in String name, in Quat value )
  InlineUniform ( in String name, in Vec2 value )
  InlineUniform ( in String name, in Vec3 value )
  InlineUniform ( in String name, in Vec4 value )
  InlineUniform ()
InlineUniform clone ? ()
Color getColor ? ()
Float32 getFloat32 ? ()
InlineTexture getInlineTexture ? ()
Integer getInteger ? ()
String getKLTypeName ? ()
Mat33 getMat33 ? ()
Mat44 getMat44 ? ()
String getName ? ()
Quat getQuat ? ()
Integer getType ? ()
Vec2 getVec2 ? ()
Vec3 getVec3 ? ()
Vec4 getVec4 ? ()
Boolean isOptional ? ()
  setOptional ! ()

Methods in detail

InlineUniform ( in InlineUniform other )

copy constructor


InlineUniform ( in String name, in Color value )

constructs a uniform from a Color value


InlineUniform ( in String name, in Float32 value )

constructs a uniform from a Float32 value


InlineUniform ( in String name, in InlineTexture value )

constructs a uniform from a InlineTexture value


InlineUniform ( in String name, in Integer value )

constructs a uniform from a Integer value


InlineUniform ( in String name, in Mat33 value )

constructs a uniform from a Mat33 value


InlineUniform ( in String name, in Mat44 value )

constructs a uniform from a Mat44 value


InlineUniform ( in String name, in Quat value )

constructs a uniform from a Quat value


InlineUniform ( in String name, in Vec2 value )

constructs a uniform from a Vec2 value


InlineUniform ( in String name, in Vec3 value )

constructs a uniform from a Vec3 value


InlineUniform ( in String name, in Vec4 value )

constructs a uniform from a Vec4 value


InlineUniform ()

default constructor


InlineUniform InlineUniform.clone? ()

clone method


Color InlineUniform.getColor? ()

returns the uniform’s Color value


Float32 InlineUniform.getFloat32? ()

returns the uniform’s Float32 value


InlineTexture InlineUniform.getInlineTexture? ()

returns the uniform’s InlineTexture value


Integer InlineUniform.getInteger? ()

returns the uniform’s Integer value


String InlineUniform.getKLTypeName? ()

returns the name of the klType


Mat33 InlineUniform.getMat33? ()

returns the uniform’s Mat33 value


Mat44 InlineUniform.getMat44? ()

returns the uniform’s Mat44 value


String InlineUniform.getName? ()

returns the name of this uniform


Quat InlineUniform.getQuat? ()

returns the uniform’s Quat value


Integer InlineUniform.getType? ()

returns the type of this uniform. for comparison the InlineUniform_Type constants can be used.


Vec2 InlineUniform.getVec2? ()

returns the uniform’s Vec2 value


Vec3 InlineUniform.getVec3? ()

returns the uniform’s Vec3 value


Vec4 InlineUniform.getVec4? ()

returns the uniform’s Vec4 value


Boolean InlineUniform.isOptional? ()

returns true if this uniform is optional


InlineUniform.setOptional! ()

sets the optional flag on the uniform. the shader might decide to ignore invalid and optional uniforms.