vcanim.gif (8357 bytes)SAA_edgeGetDiscontinuity
Home ] Sales ] Products ] Services ] Support ] Downloads ]

 

 


SAA_edgeGetDiscontinuity

SAA_edgeSetDiscontinuity

Sets and retrieves edge discontinuity flags.

SAA_edgeGetDiscontinuity sceneID elem nbEdges edges disc
SAA_edgeSetDiscontinuity sceneID elem nbEdges edges disc

elem

A mesh. Use SAA_AllocElem to allocate it.

nbEdges

Number of edges.

edges

Array of edges whose discontinuity flags are to be set. Use SAA_AllocSubElem to allocate it.

disc

Array of boolean flags. Use SAA_AllocShort to allocate it.

See Also

Example

  proc SAA_edgeGetDiscontinuityExample {} {

    global SAA_Constants
   
    set scene [ SAA_AllocScene ]

    SAA_sceneGetCurrent $scene

    set elem [SAA_AllocElem]

    SAA_meshCreateDodecahedron $scene 4.0 $elem

    SAA_meshGetNbEdges $scene $elem nb

    set edges [SAA_AllocSubElem $nb]

    set disc [SAA_AllocShort $nb]

    set newDisc [SAA_AllocShort $nb]

    SAA_meshGetEdges $scene $elem $SAA_Constants(SAA_GEOM_ORIGINAL) 0 $nb $edges

# Set the first four edge discontinuity flags to TRUE.

    for { set j 0 } { $j < 4 } { incr j } {

        access $disc $j 1
    }

# Set the other to FALSE.

    for { set k 4 } { $k < $nb } { incr k } {

        access $disc $k 0
    }

    SAA_edgeSetDiscontinuity $scene $elem $nb $edges $disc

    SAA_edgeGetDiscontinuity $scene $elem $nb $edges $newDisc

# Compare the values from Get and Set to see if they match.

    for { set j 0 } { $j < $nb } { incr j } {
       
        puts "GET DISC\[$j\] = [access $newDisc $j]"
        puts "SET DISC\[$j\] = [access $disc $j]"
    }

    forech item "$scene $elem $edges $disc $newDisc" {

        SAA_Free $item
    }
}


SAA Index ] Examples SAA calls index ]

copyright Video-Collage Inc.