RenderBarycentricBlend¶
Overview¶
RenderProgram for a triangular barycentric blend.
NOTE: Does not apply perspective correction, is purely a 2d blend.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class RenderBarycentricBlend¶
Constructor¶
new RenderBarycentricBlend( pointA : Vector2, pointB : Vector2, pointC : Vector2, accuracy : RenderBarycentricBlendAccuracy, a : RenderProgram, b : RenderProgram, c : RenderProgram, logic? : RenderBarycentricBlendLogic )¶
Instance Methods¶
getName() : string¶
withChildren( children : RenderProgram[] ) : RenderBarycentricBlend¶
transformed( transform : Matrix3 ) : RenderProgram¶
equalsTyped( other : this ) : boolean¶
(protected)
getSimplified( children : RenderProgram[] ) : RenderProgram | null¶
(protected)
evaluate( context : RenderEvaluationContext ) : Vector4¶
writeInstructions( instructions : RenderInstruction[] )¶
serialize() : SerializedRenderBarycentricBlend¶
Instance Properties¶
logic : RenderBarycentricBlendLogic¶
(readonly)
Static Methods¶
deserialize( obj : SerializedRenderBarycentricBlend ) : RenderBarycentricBlend¶
Class RenderBarycentricBlendLogic¶
Constructor¶
new RenderBarycentricBlendLogic( det : number, diffA : Vector2, diffB : Vector2, pointC : Vector2, accuracy : RenderBarycentricBlendAccuracy )¶
Instance Methods¶
equals( other : RenderBarycentricBlendLogic ) : boolean¶
apply( output : Vector4, context : RenderEvaluationContext, aColor : Vector4, bColor : Vector4, cColor : Vector4 )¶
Static Methods¶
from( pointA : Vector2, pointB : Vector2, pointC : Vector2, accuracy : RenderBarycentricBlendAccuracy ) : RenderBarycentricBlendLogic¶
Class RenderInstructionBarycentricBlend¶
Constructor¶
new RenderInstructionBarycentricBlend( logic : RenderBarycentricBlendLogic )¶
Instance Methods¶
toString() : string¶
equals( other : RenderInstruction, areLocationsEqual : ( a: RenderInstructionLocation, b: RenderInstructionLocation ) => boolean ) : boolean¶
execute( stack : RenderExecutionStack, context : RenderEvaluationContext, executor : RenderExecutor )¶
writeBinary( encoder : ByteEncoder, getOffset : ( location: RenderInstructionLocation ) => number )¶
getBinaryLength() : number¶
Static Methods¶
fromBinary( encoder : ByteEncoder, offset : number, getLocation : ( offset: number ) => RenderInstructionLocation ) : RenderInstructionBarycentricBlend¶
Type SerializedRenderBarycentricBlend¶
- type: "RenderBarycentricBlend"
- pointA: number[]
- pointB: number[]
- pointC: number[]
- accuracy: RenderBarycentricBlendAccuracy
- a: SerializedRenderProgram
- b: SerializedRenderProgram
- c: SerializedRenderProgram
Source Code¶
See the source for RenderBarycentricBlend.ts in the alpenglow repository.