RenderModeAttrib

class RenderModeAttrib

Bases: RenderAttrib

Specifies how polygons are to be drawn.

Inheritance diagram

digraph inheritance7f5565070b { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "RenderAttrib" [URL="acron.core.RenderAttrib.html#acron.core.RenderAttrib",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritableReferenceCount" -> "RenderAttrib" [arrowsize=0.75,style=""]; "RenderModeAttrib" [URL="acron.core.RenderModeAttrib.html#acron.core.RenderModeAttrib",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "RenderAttrib" -> "RenderModeAttrib" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedWritable" [URL="acron.core.TypedWritable.html#acron.core.TypedWritable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedWritable" [arrowsize=0.75,style=""]; "TypedWritableReferenceCount" [URL="acron.core.TypedWritableReferenceCount.html#acron.core.TypedWritableReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritable" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; }
enum Mode
enumerator M_unchanged = 0
enumerator M_filled = 1

Normal, filled polygons.

enumerator M_wireframe = 2

Wireframe polygons, possibly with thickness.

enumerator M_point = 3

Points at vertices only, possibly with thickness andor perspective sizing.

enumerator M_filled_flat = 4

Filled polygons, without any particular emphasis on perspective correctness (a particularly useful designation for software rendering sprites).

enumerator M_filled_wireframe = 5

Filled polygons with wireframe rendered in front. The wireframe is given a solid color.

static RenderModeAttrib.get_class_slot()
static RenderModeAttrib.get_class_type()
RenderModeAttrib.get_geom_rendering()

Returns the union of the Geom::GeomRendering bits that will be required once this RenderModeAttrib is applied to a geom which includes the indicated geom_rendering bits.

RenderModeAttrib.get_mode()

Returns the render mode.

RenderModeAttrib.get_perspective()

Returns the perspective flag. When this is true, the point thickness represented by get_thickness() is actually a width in 3-d units, and the points should scale according to perspective. When it is false, the default, the point thickness is actually a width in pixels, and points are a uniform size regardless of distance from the camera.

RenderModeAttrib.get_thickness()

Returns the line width or point thickness. This is only relevant when rendering points or lines, such as when the mode is M_wireframe or M_point (or when rendering actual points or lines primitives in M_polygon mode).

RenderModeAttrib.get_wireframe_color()

Returns the color that is used in M_filled_wireframe mode to distinguish the wireframe from the rest of the geometry.

static RenderModeAttrib.make()

Constructs a new RenderModeAttrib object that specifies whether to draw polygons in the normal, filled mode, or wireframe mode, or in some other yet-to-be-defined mode.

The thickness parameter specifies the thickness to be used for wireframe lines, as well as for ordinary linestrip lines; it also specifies the diameter of points. (Thick lines are presently only supported in OpenGL; but thick points are supported on either platform.)

If perspective is true, the point thickness represented is actually a width in 3-d units, and the points should scale according to perspective. When it is false, the point thickness is actually a width in pixels, and points are a uniform screen size regardless of distance from the camera.

In M_filled_wireframe mode, you should also specify the wireframe_color, indicating the flat color to assign to the overlayed wireframe.

static RenderModeAttrib.make_default()

Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.