rfm2  22.0
A python-based rewrite of RenderMan for Maya
 All Classes Namespaces Files Functions Variables Pages
rfm2.vp.geo.sphere.Sphere Class Reference
+ Inheritance diagram for rfm2.vp.geo.sphere.Sphere:
+ Collaboration diagram for rfm2.vp.geo.sphere.Sphere:

Public Member Functions

def __init__
 
def is_static
 
def vtx_buffer_count
 
def vtx_buffer
 
def idx_buffer
 
def has_uvs
 
def uv_buffer
 
- Public Member Functions inherited from rfm2.vp.geo.base.Vp2GeometryBase
def __init__
 
def defaulted_value
 
def is_static
 
def instance_draw_method
 
def instance_display_mode
 
def instance_vp2_primitive
 
def instance_enabled
 
def opacity
 
def get_input_params
 
def set_input_params
 
def vtx_buffer_count
 
def vtx_buffer
 
def has_uvs
 
def uv_buffer
 
def color_buffer
 
def idx_buffer
 

Public Attributes

 rows
 
 cols
 
 radius
 
 uv_flips
 
 uv_offsets
 
- Public Attributes inherited from rfm2.vp.geo.base.Vp2GeometryBase
 id
 
 textured
 
 num_instances
 
 inst_display_mode
 
 inst_draw_method
 
 inst_index_buffer
 
 inst_vp_shader
 
 method
 
 kwargs
 
 is_deforming_when_transformed
 

Constructor & Destructor Documentation

def rfm2.vp.geo.sphere.Sphere.__init__ (   self,
  jsondict 
)

Member Function Documentation

def rfm2.vp.geo.sphere.Sphere.has_uvs (   self)
Return True if we can emit a uv vertex buffer.
def rfm2.vp.geo.sphere.Sphere.idx_buffer (   self,
  idx_buffer,
  num_vtx,
  start_idx,
  inst_idx 
)
Fill the provided index buffer to draw the shape.
This is a 4x4 sphere
0  1  2  3- 4     0  1  2  3  4
        |/ |/ |/ |/ |    [0, 5, 1, 6, 2, 7, 3, 8, 4, 9, 9,
5  6  7  8- 9     5  6  7  8  9     5, 5, 10, 6, 11, 7, 12, 8, 13, 9, 14, 14
        |/ |/ |/ |/ |     10, 10, 15, 11, 16, 12, 17, 13, 18, 14, 19, 19]
10 11 12 13-14    10 11 12 13 14
        |/ |/ |/ |/ |
15 16 17 18-19    15  16 17 18 19

+ Here is the call graph for this function:

def rfm2.vp.geo.sphere.Sphere.is_static (   self)
Tells the vp code if the geometry is static or deforming, like a spot
light frustum for example
def rfm2.vp.geo.sphere.Sphere.uv_buffer (   self)
Return a list of array coordinates for the shape. They should be
ordered exactly like the vertex buffer points and have the same size
as the vxt buffer.
The default implementation returns a zero-filled list the same size
as the vtx buffer to keep the uv buffer aligned with the vtx buffer.
def rfm2.vp.geo.sphere.Sphere.vtx_buffer (   self)
Return a list of vertices (list) in local space.
a 4x4 sphere looks like so:
    0  1  2  3  - 0
    4  5  6  7  - 4
    8  9  10 11 - 8
    12 13 14 15 - 12
i.e., we repeat the first an last vertex in each column so they may have
different uv coords. The first vertex has u=0.0 and the repeated first
vertex has u=1.0.
The top and bottom rows are the poles and all vertice have the same position.
def rfm2.vp.geo.sphere.Sphere.vtx_buffer_count (   self)
Return the number of vertices in this buffer.

Member Data Documentation

rfm2.vp.geo.sphere.Sphere.cols
rfm2.vp.geo.sphere.Sphere.radius
rfm2.vp.geo.sphere.Sphere.rows
rfm2.vp.geo.sphere.Sphere.uv_flips
rfm2.vp.geo.sphere.Sphere.uv_offsets

The documentation for this class was generated from the following file: