It is currently Sat May 04, 2024 8:52 am
class Vector4;
class SIMDVector
{
public:
__m128 vec;
public:
SIMDVector() {};
void StoreVector4(Vector4* vec4) { _mm_storeu_ps( &vec4->x, vec );}
};
1>c:\users\superfast\documents\visual studio 2012\projects\brownengine\brownengine\poop_math.h(17): error C2027: use of undefined type 'Vector4'
1> c:\users\superfast\documents\visual studio 2012\projects\brownengine\brownengine\poop_math.h(7) : see declaration of 'Vector4'
1>c:\users\superfast\documents\visual studio 2012\projects\brownengine\brownengine\poop_math.h(17): error C2227: left of '->x' must point to class/struct/union/generic type
stoopdapoop wrote:Ok, I got a fresh one for you guys. I'm writing my own mini math library using SIMD intrinsics. I was using XNAmath for a bit, but all that C style code was pretty ugly and annoying.
So here's my problem, I love me some forward declarations, but for some reason this snippet is returning an error.
- Code: Select all
class Vector4;
class SIMDVector
{
public:
__m128 vec;
public:
SIMDVector() {};
void StoreVector4(Vector4* vec4) { _mm_storeu_ps( &vec4->x, vec );}
};
The errors are
- Code: Select all
1>c:\users\superfast\documents\visual studio 2012\projects\brownengine\brownengine\poop_math.h(17): error C2027: use of undefined type 'Vector4'
1> c:\users\superfast\documents\visual studio 2012\projects\brownengine\brownengine\poop_math.h(7) : see declaration of 'Vector4'
1>c:\users\superfast\documents\visual studio 2012\projects\brownengine\brownengine\poop_math.h(17): error C2227: left of '->x' must point to class/struct/union/generic type
Vector4 does get defined in this header, so I'm trying to figure out the hell it's complaining. Vector4 is very forward-declarable since I only reference one through a pointer. Can you not forward declare a class that doesn't have a .cpp file or something? I know I could fix this by moving this code to the end of the header, but what gives? google is proving unhelpful.
Edit: nice posting your question at the exact same time as me, arma.
stoopdapoop wrote:yeah, your point one is very valid, dunno why I thought that'd work.
Soulia wrote:I'd like to implement the AR2 impact effect (that small flash when a AR2 shot hits a surface) to another weapon. Is there a simple way to do this?
** Executing...
** Command: "d:\games\steam\steamapps\insert name here\sourcesdk\bin\source2007\bin\vbsp.exe"
** Parameters: -game "d:\games\steam\steamapps\SourceMods\serioushalf-life" "D:\Games\Steam\SteamApps\insert name here\sourcesdk_content\hl2\mapsrc\serioushalflife\map01"
Valve Software - vbsp.exe (May 19 2009)
2 threads
materialPath: d:\games\steam\steamapps\SourceMods\serioushalf-life\materials
Loading D:\Games\Steam\SteamApps\insert name here\sourcesdk_content\hl2\mapsrc\serioushalflife\map01.vmf
Patching WVT material: maps/map01/nature/blenddirtgrass001a_wvt_patch
Patching WVT material: maps/map01/dev/dev_blendmeasure_wvt_patch
fixing up env_cubemap materials on brush sides...
ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (0)
ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (0)
Processing areas...done (0)
Building Faces...done (0)
Chop Details...done (0)
Find Visible Detail Sides...
Merged 276 detail faces...done (0)
Merging details...done (0)
FixTjuncs...
PruneNodes...
WriteBSP...
done (0)
writing D:\Games\Steam\SteamApps\insert name here\sourcesdk_content\hl2\mapsrc\serioushalflife\map01.prt...Building visibility clusters...
done (0)
Creating default LDR cubemaps for env_cubemap using skybox materials:
skybox/sky_day01_01*.vmt
! Run buildcubemaps in the engine to get the correct cube maps.
Creating default HDR cubemaps for env_cubemap using skybox materials:
skybox/sky_day01_01*.vmt
! Run buildcubemaps in the engine to get the correct cube maps.
Finding displacement neighbors...
Finding lightmap sample positions...
Displacement Alpha : 0...1...2...3...4...5...6...7...8...9...10
Building Physics collision data...
done (0) (265476 bytes)
Error! prop_static using model "models/props_interiors/furniture_couch01a.mdl", which must be used on a dynamic entity (i.e. prop_physics). Deleted.
Error loading studio model "models/props_interiors/furniture_couch01a.mdl"!
Error! prop_static using model "models/props_c17/furniturecouch001a.mdl", which must be used on a dynamic entity (i.e. prop_physics). Deleted.
Error loading studio model "models/props_c17/furniturecouch001a.mdl"!
Placing detail props : 0...1...2...3...4...5...6...7...8...9...10
Water found with no water_lod_control entity, creating a default one.
Compacting texture/material tables...
Reduced 757 texinfos to 553
Reduced 84 texdatas to 73 (2515 bytes to 2149)
Writing D:\Games\Steam\SteamApps\insert name here\sourcesdk_content\hl2\mapsrc\serioushalflife\map01.bsp
2 seconds elapsed
** Executing...
** Command: "d:\games\steam\steamapps\insert name here\sourcesdk\bin\source2007\bin\vvis.exe"
** Parameters: -game "d:\games\steam\steamapps\SourceMods\serioushalf-life" "D:\Games\Steam\SteamApps\insert name here\sourcesdk_content\hl2\mapsrc\serioushalflife\map01"
Valve Software - vvis.exe (May 19 2009)
2 threads
reading d:\games\steam\steamapps\insert name here\sourcesdk_content\hl2\mapsrc\serioushalflife\map01.bsp
reading d:\games\steam\steamapps\insert name here\sourcesdk_content\hl2\mapsrc\serioushalflife\map01.prt
319 portalclusters
562 numportals
BasePortalVis: 0...1...2...3...4...5...6...7...8...9...10 (0)
PortalFlow: 0...1...2...3...4...5...6...7...8...9...10 (0)
Optimized: 142 visible clusters (0.00%)
Total clusters visible: 21371
Average clusters visible: 66
Building PAS...
Average clusters audible: 201
visdatasize:21713 compressed from 25520
writing d:\games\steam\steamapps\insert name here\sourcesdk_content\hl2\mapsrc\serioushalflife\map01.bsp
0 seconds elapsed
** Executing...
** Command: Copy File
** Parameters: "D:\Games\Steam\SteamApps\insert name here\sourcesdk_content\hl2\mapsrc\serioushalflife\map01.bsp" "d:\games\steam\steamapps\SourceMods\serioushalf-life\maps\map01.bsp"
** Executing...
** Command: "d:\games\steam\steamapps\insert I love hammer here\sourcesdk\bin\source2007\bin\vbsp.exe"
** Parameters: -game "d:\games\steam\steamapps\SourceMods\serioushalf-life" "D:\Games\Steam\SteamApps\insert I love hammer here\sourcesdk_content\hl2\mapsrc\serioushalflife\map01_v4"
Valve Software - vbsp.exe (May 19 2009)
2 threads
materialPath: d:\games\steam\steamapps\SourceMods\serioushalf-life\materials
Loading D:\Games\Steam\SteamApps\insert I love hammer here\sourcesdk_content\hl2\mapsrc\serioushalflife\map01_v4.vmf
Patching WVT material: maps/map01_v4/nature/blenddirtgrass001a_wvt_patch
fixing up env_cubemap materials on brush sides...
ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (0)
**** leaked ****
FindPortalSide: Couldn't find a good match for which brush to assign to a portal near (-2048.0 6656.0 584.0)
Leaf 0 contents:
Leaf 1 contents: CONTENTS_SOLID
viscontents (node 0 contents ^ node 1 contents): CONTENTS_SOLID
This means that none of the brushes in leaf 0 or 1 that touches the portal has CONTENTS_SOLID
Check for a huge brush enclosing the coordinates above that has contents CONTENTS_SOLID
Candidate brush IDs:
FindPortalSide: Couldn't find a good match for which brush to assign to a portal near (-2048.0 6656.0 1304.0)
Leaf 0 contents:
Leaf 1 contents: CONTENTS_SOLID
viscontents (node 0 contents ^ node 1 contents): CONTENTS_SOLID
This means that none of the brushes in leaf 0 or 1 that touches the portal has CONTENTS_SOLID
Check for a huge brush enclosing the coordinates above that has contents CONTENTS_SOLID
Candidate brush IDs:
FindPortalSide: Couldn't find a good match for which brush to assign to a portal near (-2560.0 7168.0 608.0)
Leaf 0 contents:
Leaf 1 contents: CONTENTS_SOLID
viscontents (node 0 contents ^ node 1 contents): CONTENTS_SOLID
This means that none of the brushes in leaf 0 or 1 that touches the portal has CONTENTS_SOLID
Check for a huge brush enclosing the coordinates above that has contents CONTENTS_SOLID
Candidate brush IDs:
FindPortalSide: Couldn't find a good match for which brush to assign to a portal near (-3584.0 7168.0 608.0)
Leaf 0 contents:
Leaf 1 contents: CONTENTS_SOLID
viscontents (node 0 contents ^ node 1 contents): CONTENTS_SOLID
This means that none of the brushes in leaf 0 or 1 that touches the portal has CONTENTS_SOLID
Check for a huge brush enclosing the coordinates above that has contents CONTENTS_SOLID
Candidate brush IDs:
FindPortalSide: Couldn't find a good match for which brush to assign to a portal near (-4096.0 6656.0 608.0)
Leaf 0 contents: CONTENTS_SOLID
Leaf 1 contents:
viscontents (node 0 contents ^ node 1 contents): CONTENTS_SOLID
This means that none of the brushes in leaf 0 or 1 that touches the portal has CONTENTS_SOLID
Check for a huge brush enclosing the coordinates above that has contents CONTENTS_SOLID
Candidate brush IDs:
FindPortalSide: Couldn't find a good match for which brush to assign to a portal near (-2048.0 5632.0 584.0)
Leaf 0 contents:
Leaf 1 contents: CONTENTS_SOLID
viscontents (node 0 contents ^ node 1 contents): CONTENTS_SOLID
This means that none of the brushes in leaf 0 or 1 that touches the portal has CONTENTS_SOLID
Check for a huge brush enclosing the coordinates above that has contents CONTENTS_SOLID
Candidate brush IDs:
FindPortalSide: Couldn't find a good match for which brush to assign to a portal near (-2048.0 5632.0 1304.0)
Leaf 0 contents:
Leaf 1 contents: CONTENTS_SOLID
viscontents (node 0 contents ^ node 1 contents): CONTENTS_SOLID
This means that none of the brushes in leaf 0 or 1 that touches the portal has CONTENTS_SOLID
Check for a huge brush enclosing the coordinates above that has contents CONTENTS_SOLID
Candidate brush IDs:
FindPortalSide: Couldn't find a good match for which brush to assign to a portal near (-2048.0 4168.0 184.0)
Leaf 0 contents:
Leaf 1 contents: CONTENTS_SOLID
viscontents (node 0 contents ^ node 1 contents): CONTENTS_SOLID
This means that none of the brushes in leaf 0 or 1 that touches the portal has CONTENTS_SOLID
Check for a huge brush enclosing the coordinates above that has contents CONTENTS_SOLID
Candidate brush IDs:
*** Suppressing further FindPortalSide errors.... ***
Processing areas...done (0)
Building Faces...done (0)
FixTjuncs...
PruneNodes...
WriteBSP...
done (0)
Creating default LDR cubemaps for env_cubemap using skybox materials:
skybox/sky_day01_01*.vmt
! Run buildcubemaps in the engine to get the correct cube maps.
Creating default HDR cubemaps for env_cubemap using skybox materials:
skybox/sky_day01_01*.vmt
! Run buildcubemaps in the engine to get the correct cube maps.
Finding displacement neighbors...
Finding lightmap sample positions...
Displacement Alpha : 0...1...2...3...4...5...6...7...8...9...10
Building Physics collision data...
done (0) (169324 bytes)
Placing detail props : 0...1...2...3...4...5...6...7...8...9...10
Compacting texture/material tables...
Reduced 283 texinfos to 218
Reduced 56 texdatas to 54 (1772 bytes to 1706)
Writing D:\Games\Steam\SteamApps\insert I love hammer here\sourcesdk_content\hl2\mapsrc\serioushalflife\map01_v4.bsp
1 second elapsed
** Executing...
** Command: "d:\games\steam\steamapps\insert I love hammer here\sourcesdk\bin\source2007\bin\vvis.exe"
** Parameters: -game "d:\games\steam\steamapps\SourceMods\serioushalf-life" "D:\Games\Steam\SteamApps\insert I love hammer here\sourcesdk_content\hl2\mapsrc\serioushalflife\map01_v4"
Valve Software - vvis.exe (May 19 2009)
2 threads
reading d:\games\steam\steamapps\insert I love hammer here\sourcesdk_content\hl2\mapsrc\serioushalflife\map01_v4.bsp
reading d:\games\steam\steamapps\insert I love hammer here\sourcesdk_content\hl2\mapsrc\serioushalflife\map01_v4.prt
LoadPortals: couldn't read d:\games\steam\steamapps\insert I love hammer here\sourcesdk_content\hl2\mapsrc\serioushalflife\map01_v4.prt
** Executing...
** Command: Copy File
** Parameters: "D:\Games\Steam\SteamApps\insert I love hammer here\sourcesdk_content\hl2\mapsrc\serioushalflife\map01_v4.bsp" "d:\games\steam\steamapps\SourceMods\serioushalf-life\maps\map01_v4.bsp"
**** leaked ****
Users browsing this forum: No registered users