AnnotatedOutline: Class containing functions and data relating to annotating...

Description Value Super classes Public fields Methods Author(s) Examples

Description

An AnnotatedOutline contains a function to annotate tears on the outline.

Value

AnnotatedOutline object, with extra fields for tears latitude of rim phi0 and index of fixed point i0.

Super classes

retistruct::OutlineCommon -> retistruct::Outline -> retistruct::PathOutline -> AnnotatedOutline

Public fields

tears

Matrix in which each row represents a tear by the indices into the outline points of the apex (V0) and backward (VB) and forward (VF) points

phi0

rim angle in radians

lambda0

longitude of fixed point

i0

index of fixed point

Methods

Public methods

Inherited methods

Method new()

Constructor

Usage
AnnotatedOutline$new(...)
Arguments
...

Parameters to PathOutline


Method labelTearPoints()

Label a set of three unlabelled points supposed to refer to the apex and vertices of a cut and tear with the V0 (Apex), VF (forward vertex) and VB (backward vertex) labels.

Usage
AnnotatedOutline$labelTearPoints(pids)
Arguments
pids

the vector of three indices

Returns

Vector of indices labelled with V0, VF and VB


Method whichTear()

Return index of tear in an AnnotatedOutline in which a point appears

Usage
AnnotatedOutline$whichTear(pid)
Arguments
pid

ID of point

Returns

ID of tear


Method getTear()

Return indices of tear in AnnotatedOutline

Usage
AnnotatedOutline$getTear(tid)
Arguments
tid

Tear ID, which can be returned from whichTear()

Returns

Vector of three point IDs, labelled with V0, VF and VB


Method getTears()

Get tears

Usage
AnnotatedOutline$getTears()
Returns

Matrix of tears


Method computeTearRelationships()

Compute the parent relationships for a potential set of tears. The function throws an error if tears overlap.

Usage
AnnotatedOutline$computeTearRelationships(tears = NULL)
Arguments
tears

Matrix containing columns V0 (Apices of tears) VB (Backward vertices of tears) and VF (Forward vertices of tears)

Returns

List containing


Method addTear()

Add tear to an AnnotatedOutline

Usage
AnnotatedOutline$addTear(pids)
Arguments
pids

Vector of three point IDs to be added


Method removeTear()

Remove tear from an AnnotatedOutline

Usage
AnnotatedOutline$removeTear(tid)
Arguments
tid

Tear ID, which can be returned from whichTear()


Method checkTears()

Check that all tears are correct.

Usage
AnnotatedOutline$checkTears()
Returns

If all is OK, returns empty vector. If not, returns indices of problematic tears.


Method setFixedPoint()

Set fixed point

Usage
AnnotatedOutline$setFixedPoint(i0, name)
Arguments
i0

Index of fixed point

name

Name of fixed point


Method getFixedPoint()

Get point ID of fixed point

Usage
AnnotatedOutline$getFixedPoint()
Returns

Point ID of fixed point


Method getRimSet()

Get point IDs of points on rim

Usage
AnnotatedOutline$getRimSet()
Returns

Point IDs of points on rim


Method ensureFixedPointInRim()

Ensure that the fixed point i0 is in the rim, not a tear. Alters object in which i0 may have been changed.

Usage
AnnotatedOutline$ensureFixedPointInRim()

Method getRimLengths()

Get lengths of edges on rim

Usage
AnnotatedOutline$getRimLengths()
Returns

Vector of rim lengths


Method clone()

The objects of this class are cloneable with this method.

Usage
AnnotatedOutline$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

David Sterratt

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
P <- rbind(c(1,1),   c(2,1),  c(2,-1),
           c(1,-1),  c(1,-2), c(-1,-2),
           c(-1,-1), c(-2,-1),c(-2,1),
           c(-1,1),  c(-1,2), c(1,2))
o <- TriangulatedOutline$new(P)
o$addTear(c(3, 4, 5))
o$addTear(c(6, 7, 8))
o$addTear(c(9, 10, 11))
o$addTear(c(12, 1, 2))
flatplot(o)

retistruct documentation built on April 4, 2020, 5:08 p.m.