CCentroid:new
The new method constructs a new instance of a CCentroid object. The CCentroid class includes properties that control calculation of centroid positions. Two different constructor overloads are available to create a new CCentroid and initialize the properties.
C = CCentroid:new() C = CCentroid:new( CCentroid2 ) where
|
The following script illustrates using the 2 constructors:
|
-- create CCentroid C1 with defaults |
|
-- copy C1 to a new CCentroid C2 |
|
-- change the sign |
|
-- result: C1 sign = 1 |
|
-- result: C2 sign = 0 |