Giter Site home page Giter Site logo

spark's Introduction

SPARK Particle Engine

Collision demo

Explosion demo

Fire demo

Flakes demo

Galaxy demo

Gravitation demo

Build guide

Note:

${SPARK_DIR} refers to the folder where SPARK is installed.

Source directories:

- For the engine : ${SPARK_DIR}/projects/engine
- For the demos : ${SPARK_DIR}/projects/demos

Recommended build directory:

- For the engine : ${SPARK_DIR}/projects/build/engine
- For the demos : ${SPARK_DIR}/projects/build/demos

To build a project (engine or demos):

First, you have to know how CMake works. If not, there are plenty of tutorials on the net.
When configuring projects for the first time, verify the variables which start with 'SPARK_',
of 'DEMOS_' if you configure the demos.
Note that SPARK release dlls are automatically copied to the 'demos/bin' folder.

Note:

Libraries are put in the folder ${SPARK_DIR}/lib/<system-name>@<generator>/<build-type>
where:
	<system-name> is the name of your OS (ex: Windows)
	<generator> is the name of the generator used (ex: Visual Studio 10)
	<build-type> is 'dynamic' or 'static', depending on the project settings. (see SPARK_STATIC_BUILD variable)

Demos are put in ${SPARK_DIR}/demos/bin

spark's People

Contributors

julienfryer avatar kingscallop avatar stardeath avatar synxis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spark's Issues

License

Hi.

Would you consider adding a license for this repo?

Setting zone as full, still allowing particles to enter inside zone

Hi,

As the definition of setZone suggests:

		/**
		* @brief Sets the Zone of this Modifier
		*
		* If the Zone is NULL, the Zone is considered to be the entire universe.
		*
		* @param zone : the Zone of this Modifier
		* @param full : true to consider the Zone as a full object so that particles are not allowed to be within
		*/
		void setZone(Zone* zone,bool full = false);

when I am trying to set full to true for a point mass, still I see particles entering the zone and not getting deflected from the surface as I was expecting.

Fyi: I changed the obstacles to point mass in the collision demo to see this effect.

Could you please explain its correct use or if it is really an issue?

Here I moved only boxes to show the exact position of the particles:

spark issue

Thanks!
Vivek

SPK_GraphInterpolator.h:246:5: fatal error: use of undeclared identifier 'attrName'

Getting the following error after failure of compilation, how to fix it? Appreciation for your reply!

SPK_GraphInterpolator.h:246:5: fatal error: use of undeclared identifier 'attrName'
spk_field(0, float, x, setX, getX);

F:/trunk/MiniStar/Src/MiniStar/Include/MiniStar/Core/SPK_DescriptionDefines.h:363:10: note: expanded from macro 'spk_field'
name,
^
SPK_DescriptionDefines.h:317:3: note: expanded from macro '_spk_structured_attr_body'
VA_ARGS
^
SPK_DescriptionDefines.h:153:4: note: expanded from macro '_spk_description_body'
VA_ARGS
^

Build failed on x64

Library is making an assumtions that sizeof(size_t) == sizeof(unsigned int) (i.e. SPK_Group::373) which isn't true on x64 (sizeof(size_t) == 8)

Fixed by adding
TYPE_SIZE_T,
into SPK_Types::61
and
spk_basetype( size_t, TYPE_SIZE_T, meta::PassByValue );
into SPK_Types::308

But its still won't build because of some kind of error in SPK::meta::Counter (its using sizeof inside contrution of type system so Im almost sure this is the root of the problem). Anybody came with the soultion?

Error sample:
spk_attribute(bool, loop, enableLooping, isLoopingEnabled); (SPK_GraphInterpolator::244)

error: redefinition of 'spkAttr<((sizeof (_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1), b>'
            struct spkAttr<((sizeof(_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1), b>
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SPK_GraphInterpolator.h:422:20: note: previous definition is here
            struct spkAttr<((sizeof(_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1), b>
                   ^
SPK_GraphInterpolator.h:464:119: error: class member cannot be redeclared
            static SPK::meta::Count<((sizeof(_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1) + 2> _spk_count_Attr (SPK::meta::Counter<((
                                                                                                                      ^
SPK_GraphInterpolator.h:427:119: note: previous declaration is here
            static SPK::meta::Count<((sizeof(_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1) + 2> _spk_count_Attr (SPK::meta::Counter<((

build spark engine failed

VS2015 build spark engine failed !!!

error C2440: 'specialization': cannot convert from 'overloaded-function' to 'unsigned int (__cdecl SPK::Group::* )(void) const'
1>  d:\engines\spark-spark2\include\Core/SPK_Group.h(392): note: None of the functions with this name in scope match the target type
1>d:\engines\spark-spark2\include\Core/SPK_Group.h(392): error C2440: 'specialization': cannot convert from 'overloaded-function' to 'void (__cdecl SPK::Group::* )(unsigned int)'

so how to fixed it , please tell me ,thx~

SpawnParticlesAction::setNb possible mistake

	void SpawnParticlesAction::setNb(unsigned int min,unsigned int max)
	{
		if (min <= max)
		{
			this->minNb = minNb;
			this->maxNb = maxNb;
		}
		else
		{
			SPK_LOG_WARNING("SpawnParticlesAction::setNb(unsigned int,unsigned int) - min is higher than max - Values are swapped");
			this->minNb = maxNb;
			this->maxNb = minNb;
		}
	}

Seems like it should be

	void SpawnParticlesAction::setNb(unsigned int min,unsigned int max)
	{
		if (min <= max)
		{
			this->minNb = min;
			this->maxNb = max;
		}
		else
		{
			SPK_LOG_WARNING("SpawnParticlesAction::setNb(unsigned int,unsigned int) - min is higher than max - Values are swapped");
			this->minNb = max;
			this->maxNb = min;
		}
	}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.