forked from kscience/visionforge
Raw version of everything
This commit is contained in:
parent
f00408166b
commit
7103f49ff9
@ -1,17 +1,43 @@
|
|||||||
# Hierarchy
|
# Hierarchy
|
||||||
|
|
||||||
![](../docs/images/hierarchy.png)
|
![](../docs/images/hierarchy.png)
|
||||||
**the image will be changed**
|
|
||||||
|
|
||||||
### Vision
|
### Vision
|
||||||
|
* function `getPropertyValue(name: Name, inherit: Boolean = false, includeStyles: Boolean = true, includeDefaults: Boolean = true)` - get property value with given layer flags.
|
||||||
|
|
||||||
* function `getProperty(name: Name, inherit: Boolean, includeStyles: Boolean, includeDefaults: Boolean)`.
|
* function `setProperty(name: Name, item: Any?)` - a convenient method to set property node or value. If `item` is null, then node is removed, not a value
|
||||||
|
Sets the `item` property to the element with the `name` identification.
|
||||||
|
|
||||||
It gets properties of element with `name` identification.
|
### VisionBase
|
||||||
`inherit` — toggles parent node property lookup. Null means inference from descriptor. Default is false.
|
|
||||||
`includeStyles` — toggles inclusion of. Null means inference from descriptor. Default is true.
|
|
||||||
`includeDefaults` — default is false.
|
|
||||||
|
|
||||||
* function `setProperty(name: Name, item: MetaItem?, notify: Boolean = true)`
|
Basic vision implementation
|
||||||
|
|
||||||
Sets the `item` property to the element with the `name` identification. `notify` is a value which toggles the necessity of the change notification. Default is true.
|
### VisionGroup
|
||||||
|
|
||||||
|
A group of Visions.
|
||||||
|
|
||||||
|
### MutableVisionGroup
|
||||||
|
|
||||||
|
Mutable version of VisionGroup.
|
||||||
|
|
||||||
|
low structure changes of this group. Unconsumed changes are discarded.
|
||||||
|
|
||||||
|
### Solid
|
||||||
|
|
||||||
|
Interface for 3-dimensional Vision.
|
||||||
|
|
||||||
|
### SolidGroup
|
||||||
|
|
||||||
|
* function `getPrototype(name: Name)` - get a prototype redirecting the request to the parent if prototype is not found. If prototype is a ref, then it is unfolded automatically.
|
||||||
|
|
||||||
|
* function `prototypes(builder: VisionContainerBuilder<Solid>.() -> Unit)` - create or edit prototype node as a group.
|
||||||
|
|
||||||
|
### SolidReferenceGroup
|
||||||
|
|
||||||
|
A reference Solid to reuse a template object.
|
||||||
|
|
||||||
|
### RootVisionGroup
|
||||||
|
|
||||||
|
Non-serializable root group used to propagate manager to its children.
|
||||||
|
|
||||||
|
* function Vision.root(manager: VisionManager) - designate this [VisionGroup] as a root group and assign a [VisionManager] as its parent.
|
||||||
|
@ -37,9 +37,9 @@ Properties, which can or cannot be inherited, are these:
|
|||||||
![](../docs/images/inheritance-2-1-2.png)
|
![](../docs/images/inheritance-2-1-2.png)
|
||||||
|
|
||||||
* `material` - a group of properties, which can be inherited and which can be changed in `children` elements.
|
* `material` - a group of properties, which can be inherited and which can be changed in `children` elements.
|
||||||
* `color` - color of an element.
|
* `color` - color of an element.
|
||||||
* `opacity` - a number from 0 to 1 which represents percents of opacity (0 for 0%, 1 for 100%).
|
* `opacity` - a number from 0 to 1 which represents percents of opacity (0 for 0%, 1 for 100%).
|
||||||
* `wireframe` - toggles the wireframe mode.
|
* `wireframe` - toggles the wireframe mode.
|
||||||
|
|
||||||
Let's see how elements of the `material` group inherit changing `color` property; ***other properties of this group inherit in the same way.***
|
Let's see how elements of the `material` group inherit changing `color` property; ***other properties of this group inherit in the same way.***
|
||||||
|
|
||||||
|
@ -1,108 +1,124 @@
|
|||||||
@startuml
|
@startuml
|
||||||
'https://plantuml.com/class-diagram
|
'https://plantuml.com/class-diagram
|
||||||
interface Vision
|
|
||||||
|
|
||||||
|
interface Vision{
|
||||||
|
val parent: VisionGroup?
|
||||||
|
fun getPropertyValue(name,inherit,includeStyles,includeDefaults): Value?
|
||||||
|
}
|
||||||
|
|
||||||
interface Solid
|
interface Solid{
|
||||||
Vision <- Solid
|
The base for 3D geometry
|
||||||
|
}
|
||||||
|
Vision <-- Solid
|
||||||
|
|
||||||
|
class VisionGroup{
|
||||||
|
A group of Visions
|
||||||
|
|
||||||
class VisionGroup
|
val children: Map<NameToken, Vision>
|
||||||
|
val defaultTarget: String
|
||||||
|
|
||||||
|
fun content(target): Map<Name, Any>
|
||||||
|
fun get(name: Name): Vision?
|
||||||
|
}
|
||||||
Vision <-- VisionGroup
|
Vision <-- VisionGroup
|
||||||
|
|
||||||
class VisionBase
|
class VisionBase{
|
||||||
Vision <- VisionBase
|
basic vision implementation
|
||||||
|
}
|
||||||
|
Vision <-- VisionBase
|
||||||
|
|
||||||
|
|
||||||
class SolidLabel
|
class SolidLabel
|
||||||
Solid <--- SolidLabel
|
Solid <--- SolidLabel
|
||||||
SolidBase <-- SolidLabel
|
|
||||||
|
|
||||||
class SolidGroup
|
class SolidGroup{
|
||||||
|
var properties: MutableMeta?
|
||||||
|
val children: Map<NameToken, Vision>
|
||||||
|
var prototypes: MutableVisionGroup?
|
||||||
|
|
||||||
|
fun getPrototype(name): Solid?
|
||||||
|
fun prototypes(builder)
|
||||||
|
}
|
||||||
Solid <--- SolidGroup
|
Solid <--- SolidGroup
|
||||||
VisionGroupBase <-- SolidGroup
|
VisionGroupBase <-- SolidGroup
|
||||||
|
|
||||||
class SolidBase
|
|
||||||
Solid <--- SolidBase
|
|
||||||
VisionBase <-- SolidBase
|
|
||||||
|
|
||||||
|
|
||||||
class SphereLayer
|
class SphereLayer
|
||||||
SolidBase <-- SphereLayer
|
Solid <-- SphereLayer
|
||||||
GeometrySolid <-- SphereLayer
|
|
||||||
|
|
||||||
class Sphere
|
class Sphere
|
||||||
SolidBase <-- Sphere
|
Solid <-- Sphere
|
||||||
GeometrySolid <-- Sphere
|
|
||||||
|
|
||||||
class Box
|
class Box
|
||||||
SolidBase <-- Box
|
|
||||||
Hexagon <-- Box
|
Hexagon <-- Box
|
||||||
|
|
||||||
class GenericHexagon
|
class GenericHexagon
|
||||||
SolidBase <-- GenericHexagon
|
|
||||||
Hexagon <-- GenericHexagon
|
Hexagon <-- GenericHexagon
|
||||||
|
|
||||||
class Extruded
|
class Extruded
|
||||||
SolidBase <-- Extruded
|
Solid <-- Extruded
|
||||||
GeometrySolid <-- Extruded
|
|
||||||
|
|
||||||
|
|
||||||
class PolyLine
|
class PolyLine
|
||||||
Solid <--- PolyLine
|
Solid <--- PolyLine
|
||||||
SolidBase <-- PolyLine
|
|
||||||
|
|
||||||
interface GeometrySolid
|
|
||||||
Solid <--- GeometrySolid
|
|
||||||
|
|
||||||
|
|
||||||
interface Hexagon
|
interface Hexagon
|
||||||
GeometrySolid <-- Hexagon
|
Solid <-- Hexagon
|
||||||
|
|
||||||
class ConeSegment
|
class ConeSegment
|
||||||
GeometrySolid <-- ConeSegment
|
Solid <-- ConeSegment
|
||||||
|
|
||||||
class ConeSurface
|
class ConeSurface
|
||||||
GeometrySolid <-- ConeSurface
|
Solid <-- ConeSurface
|
||||||
|
|
||||||
|
|
||||||
class Convex
|
class Convex
|
||||||
Solid <--- Convex
|
Solid <--- Convex
|
||||||
SolidBase <-- Convex
|
|
||||||
|
|
||||||
class Composite
|
class Composite
|
||||||
Solid <--- Composite
|
Solid <--- Composite
|
||||||
SolidBase <-- Composite
|
|
||||||
|
|
||||||
|
|
||||||
interface SolidReference
|
interface SolidReference{
|
||||||
|
val prototype: Solid
|
||||||
|
fun getPropertyValue(name,inherit,includeStyles,includeDefaults): Value?
|
||||||
|
}
|
||||||
VisionGroup <---- SolidReference
|
VisionGroup <---- SolidReference
|
||||||
|
|
||||||
interface MutableVisionGroup
|
class SolidReferenceGroup{
|
||||||
|
val refName: Name
|
||||||
|
var properties: MutableMeta?
|
||||||
|
val prototype: Solid
|
||||||
|
val children: Map<NameToken, Vision>
|
||||||
|
fun getPropertyValue(name,inherit,includeStyles,includeDefaults): Value?
|
||||||
|
}
|
||||||
|
VisionBase <-- SolidReferenceGroup
|
||||||
|
|
||||||
|
interface MutableVisionGroup{
|
||||||
|
fun onStructureChanged(owner, block)
|
||||||
|
fun removeStructureListener(owner)
|
||||||
|
}
|
||||||
VisionGroup <---- MutableVisionGroup
|
VisionGroup <---- MutableVisionGroup
|
||||||
|
|
||||||
class SolidReferenceGroup
|
class VisionGroupBase{
|
||||||
VisionGroup <-- SolidReferenceGroup
|
val children: Map<NameToken, Vision>
|
||||||
Solid <-- SolidReferenceGroup
|
fun set(name: Name?, child: Vision?)
|
||||||
VisionBase <-- SolidReferenceGroup
|
}
|
||||||
SolidReference <-- SolidReferenceGroup
|
|
||||||
|
|
||||||
class ReferenceChild
|
|
||||||
VisionGroup <-- ReferenceChild
|
|
||||||
Solid <-- ReferenceChild
|
|
||||||
SolidReference <-- ReferenceChild
|
|
||||||
|
|
||||||
|
|
||||||
class VisionGroupBase
|
|
||||||
VisionBase <-- VisionGroupBase
|
VisionBase <-- VisionGroupBase
|
||||||
MutableVisionGroup <-- VisionGroupBase
|
MutableVisionGroup <-- VisionGroupBase
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class RootVisionGroup
|
class RootVisionGroup
|
||||||
VisionGroupBase <-- RootVisionGroup
|
VisionGroupBase <-- RootVisionGroup
|
||||||
|
|
||||||
|
class VisionOfPlotly{
|
||||||
class VisionOfPlotly
|
var properties: MutableMeta?
|
||||||
|
val plot: Plot
|
||||||
|
}
|
||||||
VisionBase <-- VisionOfPlotly
|
VisionBase <-- VisionOfPlotly
|
||||||
|
|
||||||
|
class VisionOfMarkup{
|
||||||
|
val format: String
|
||||||
|
var content: String?
|
||||||
|
}
|
||||||
|
VisionBase <-- VisionOfMarkup
|
||||||
@enduml
|
@enduml
|
@ -2,6 +2,8 @@ kotlin.code.style=official
|
|||||||
kotlin.mpp.enableGranularSourceSetsMetadata=true
|
kotlin.mpp.enableGranularSourceSetsMetadata=true
|
||||||
kotlin.mpp.stability.nowarn=true
|
kotlin.mpp.stability.nowarn=true
|
||||||
kotlin.native.enableDependencyPropagation=false
|
kotlin.native.enableDependencyPropagation=false
|
||||||
|
kapt.use.worker.api=false
|
||||||
|
kapt.incremental.apt=false
|
||||||
|
|
||||||
org.gradle.jvmargs=-XX:MaxMetaspaceSize=1G
|
org.gradle.jvmargs=-XX:MaxMetaspaceSize=1G
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
Loading…
Reference in New Issue
Block a user