Erik Ogenvik
923f037b13
Introduce a separate Transforms class.
...
Used to hold transformation data, and serializing to Atlas.
2016-06-26 20:16:48 +02:00
Erik Ogenvik
773586f431
Provide an axis rotation fallback.
...
If the vectors are colinear.
2015-10-30 22:53:13 +01:00
Erik Ogenvik
7082a8b9b5
Removed incorrect rotation code.
...
If the from and to vector were parallel this code would sometimes result
in an invalid rotation of the entity being upside down.
We've fixed it by instead relying on the WFMath code for the same
functionality.
2015-09-29 21:41:01 +02:00
Olek Wojnar
7f9ff2246d
Remove CVS $Id tags
...
The legacy tags are causing build issues in Debian.
2013-07-15 20:31:59 +02:00
Erik Ogenvik
43cab79a97
Take into account size of entity when moving.
...
Else the NPC would always want to walk into even solid objects.
We should of course also add checks for solid and non-solid entities.
2013-06-16 00:12:05 +02:00
Erik Ogenvik
315586e85b
Minor optimization.
2013-05-19 23:05:03 +02:00
Alistair Riddoch
e742d7d185
Ensure shape works on Form pointers.
...
The methods look odd, as pure virtual methods which override a pure virtual
method in the base, but it is necessary so that if the method is called on
this interface, the return type is correct.
2013-01-27 01:21:22 +00:00
Alistair Riddoch
c6cab7b086
Add a virtual copy method to Shape
2013-01-27 01:10:05 +00:00
Alistair Riddoch
cd9e32c183
Handle inlining more explicitly
2012-08-07 12:27:47 +01:00
Alistair Riddoch
a5acfb9a82
Add abstract destructor to base class
2012-08-06 23:54:41 +01:00
Alistair Riddoch
86eeaca166
Add a bunch of missing headers
2012-08-02 15:40:27 +01:00
Alistair Riddoch
bc60320434
Start workong on an outline algorithm for Course
2012-05-02 15:32:38 +01:00
Alistair Riddoch
9339bb91db
More use of using for concise code
2012-05-02 15:32:14 +01:00
Alistair Riddoch
0275a6ad4c
Avoid calling potentially expensive calls in loop
2012-05-02 15:14:51 +01:00
Alistair Riddoch
4f6885bff6
Make code easier to read with "using"
2012-05-02 11:13:16 +01:00
Alistair Riddoch
ff73a63129
Add outline method to the Shape interface
2012-05-01 20:54:00 +01:00
Alistair Riddoch
c0929e42c7
Fill out class used for courses of paths and rivers
...
This class implements the wfmath shape concept, but does so with
a different set of template args, so can only be used by other templates
which use the concept as a partial specialization. This is not
legal in C++ 98 so will only really be possible once we have a solid
C++ 11 compiler.
2012-04-26 21:00:23 +01:00
Alistair Riddoch
59975387da
Add conversion support for Shape<Point> and test
2012-04-10 10:32:14 +01:00
Alistair Riddoch
9e0eb67d78
Fix a crash bug in Shape<AxisBox> conversion, and test it
2012-04-10 10:19:48 +01:00
Alistair Riddoch
eed97c7baf
Add stub of new idea class, so I don't forget
2012-04-09 00:51:09 +01:00
Alistair Riddoch
b6bb2ca23f
Mark sections
2012-04-08 20:03:53 +01:00
Alistair Riddoch
853811d36d
Implement and test RotBox Shape conversion
2012-04-05 20:43:20 +01:00
Alistair Riddoch
a79f17a2c0
Rename 2D ball as "circle", and implement conversions
2012-04-05 20:30:53 +01:00
Alistair Riddoch
644a639654
Implement equality test for shapes
2012-04-05 20:05:25 +01:00
Alistair Riddoch
2d7bf75bfc
Add missing return code change
2012-04-05 19:54:50 +01:00
Alistair Riddoch
a11c90bbdd
Add proper support for 2d axisbox
2012-04-05 19:36:27 +01:00
Alistair Riddoch
ef33478e91
Change the way errors are detected when converting from Atlas
...
WFMath can throw in a number of situations, and these exceptions
shouldn't make it to the Python wrappers.
2012-04-02 14:29:37 +01:00
Alistair Riddoch
4eb0af4359
Inline constructors, and use generic templates where possible
2012-04-01 21:18:11 +01:00
Alistair Riddoch
cfef293632
Add specialisation for Point<2>
2012-03-31 12:38:25 +01:00
Alistair Riddoch
c8e57d01a6
Re-work all the shape code to be clearer
2012-03-31 02:18:33 +01:00
Alistair Riddoch
78efe61a46
Add a seriously odd sequence accessor
2012-03-27 20:38:13 +01:00
Alistair Riddoch
bff526534c
Add a proper specialisation of getType for Line
2012-03-27 17:20:19 +01:00
Alistair Riddoch
aae636baec
Add an accessor to allow more operations
2012-03-27 17:19:27 +01:00
Alistair Riddoch
81fc1b666a
Remove unnecessary constructor arg
2012-03-25 04:35:16 +01:00
Alistair Riddoch
625569a0d7
Support WFMath::Line in the virtual API
2012-03-25 04:22:14 +01:00
Alistair Riddoch
0218443109
Add support for WFMath::Line
2012-03-24 00:50:37 +00:00
Alistair Riddoch
12f5af4819
size_t for indices
2012-01-30 13:23:18 +00:00
Alistair Riddoch
8d114651cb
Remove unnecessary const on integer template param
2012-01-25 20:20:52 +00:00
Alistair Riddoch
901755b897
Add a centre function to the shape protocol
2012-01-25 20:18:48 +00:00
Alistair Riddoch
e9808e185f
Add an intersect method to the virtual shape wrapper
2012-01-10 14:07:52 +00:00
Alistair Riddoch
93631cc61d
Simplify the way Shape templates convert from Atlas
2011-12-23 11:28:01 +00:00
Alistair Riddoch
3f12ee4643
Add a default constructor for concrete shapes
2011-12-23 09:52:45 +00:00
Alistair Riddoch
0e4077f2b5
Use WFMath::CoordType for geometry calculations
2011-04-28 01:05:03 +01:00
Alistair Riddoch
c6bd3094c5
Use C++ std::sqrt for efficiency
2011-04-27 19:46:13 +01:00
Alistair Riddoch
1894e7e22e
Use the C++ standard way to get efficient math
2011-04-27 19:35:35 +01:00
Alistair Riddoch
defc48d663
Use the C++ standard way to get efficient math
2011-04-27 19:35:13 +01:00
Alistair Riddoch
d9b5670ec1
Merge branch 'master' of github.com:worldforge/cyphesis
2011-04-27 11:22:03 +01:00
Alistair Riddoch
626478ac7b
Use WFMath::CoordType to avoid conversions
2011-04-27 11:09:07 +01:00
Alistair Riddoch
056ff0588f
Add template instantiations that are needed with O2
2011-04-14 19:50:52 +01:00
Alistair Riddoch
105a7e0442
Fix the Shape constructors
2011-02-23 08:35:27 +00:00