Commit graph

19 commits

Author SHA1 Message Date
Leonardo Zide
2390feb88f Deleted unsafe default operations. 2020-05-03 15:39:39 -07:00
Johannes Sixt
ca73f3e3ad
Synthesis of Technic Universal Joints (#456)
* Split synth info initialzation by type.

We are going to remove the type enumeration and use a class hierarchy
instead. This preparation will then be helpful.

* Make Add...Parts() overrides of a virtual AddPart() function.

Since we have a class hierarchy for the different synthesized pieces, we
can now turn a case distinction into a virtual function call.

* Move initialization based on type to derived class constructors.

Move initialization of end transformations of flexible parts into
class lcSynthInfoCurved.

* Make GetDefaultControlPoints() virtual with overrides.

* Remove obsolete enum lcSynthType.

We have replaced its purpose by derived classes by now.

* Initialize shock absorbers' spring part ID early.

This removes the awkward early return that is needed in the if-else
cascade.

* Split lcSynthInfo into derived classes for curved and straight pieces.

* Only curved parts have varying sections, start, middle, and end properties.

Move the properties from the base class to the derived class that needs
them.

* Use derived classes to mark synthesized objects of different kinds.

We will extend the derived classes in the upcoming commits.

* PieceInfo is only needed to synthesize some hoses and shock absorbers.

* Initialize edge part IDs of flexible hoses early.

This removes another case distinction in AddParts().

* Verify the number of control points loaded from a model file.

* Synthesize Technic universal joints.

The direction of one end can be changed so that it points to the control
point.

* Technic universal joints need only the position of the control point.

* Synthesize legacy universal joints.
2020-03-30 12:17:08 -07:00
Leonardo Zide
514c1e54ec Moved common includes to precompiled header. 2019-05-30 12:06:54 -07:00
Leonardo Zide
b47598f651 Added synth support for Hose Flexible parts. 2019-02-20 16:52:50 -08:00
Leonardo Zide
8ee515fcc8 Added synth support for Technic Flex-System hoses. 2019-02-19 18:05:30 -08:00
Johannes Sixt
e190900778 Convert SectionCallback to std::function<>. (#280)
This is just code hygiene. It makes the code shorter, more localized,
and more idiomatic C++.
2019-01-13 10:48:37 -08:00
leozide
c924b90955 Converted include guards to pragma once. 2017-07-19 14:20:32 -07:00
leozide
dc7f640bc9 Enum compiler test. 2017-04-13 18:12:10 -07:00
Johannes Sixt
8ee94ac310 Synthesize power functions linear actuators.
Power function linear actuators can be treated almost the same as shock
absorbers. The only difference is the orientation of the part: The parts
are extended is along the Y axis instead of the Z axis.
2017-03-18 14:58:11 +01:00
Leonardo
a74e51cd04 Fixed line endings. 2016-10-05 14:28:52 -07:00
leo
a0db9ce210 Added synth support for shock absorbers. 2016-05-01 00:20:37 +00:00
leo
9c8a602a09 Fixed accessing const arrays as non-const. 2016-04-19 18:37:50 +00:00
leo
6547969d24 Fixed a few rotation bugs in flexible objects. 2016-04-19 16:30:29 +00:00
leo
59e8583ee4 Optimized flexible axle generation. 2016-04-16 20:35:16 +00:00
leo
a24ebaaab9 Better string mesh generation. 2016-04-11 15:45:08 +00:00
leo
07d29d0fc5 Added support for flexible braided strings. 2016-04-04 05:11:29 +00:00
leo
52c97dd81a Added flexible axle support. 2016-03-04 03:18:23 +00:00
leo
b5233f714c Added options to add and remove control points. 2016-03-03 00:04:49 +00:00
leo
1cd4a8cee0 Added support for flexible technic ribbed hoses. 2016-02-29 20:13:54 +00:00